diff --git a/source/tlang/compiler/parsing/core.d b/source/tlang/compiler/parsing/core.d index c69044a2..e88fcad1 100644 --- a/source/tlang/compiler/parsing/core.d +++ b/source/tlang/compiler/parsing/core.d @@ -1281,6 +1281,9 @@ public final class Parser { Clazz clazz = parseClass(); + /* All classes declared at the Module level are static by default */ + clazz.setModifierType(InitScope.STATIC); + /* Add the class definition to the program */ modulle.addStatement(clazz); } @@ -1289,6 +1292,9 @@ public final class Parser { Struct ztruct = parseStruct(); + /* All structs declared at the Module level are static by default */ + ztruct.setModifierType(InitScope.STATIC); + /* Add the struct definition to the program */ modulle.addStatement(ztruct); }