1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-01-13 18:30:21 +00:00

Fixed problem with constantifying struct initializers. Closes #653

This commit is contained in:
jespergravgaard 2021-05-08 13:33:17 +02:00
parent 09d11f220b
commit 799f681991

View File

@ -110,6 +110,8 @@ public class SymbolTypeInference {
if(structMember == null)
throw new CompileError("Unknown struct member " + structMemberRef.getMemberName() + " in struct " + structType.getTypeName());
return structMember.getType();
} else if(structType.equals(SymbolType.VAR)) {
return SymbolType.VAR;
} else {
throw new CompileError("Dot applied to non-struct "+ structMemberRef.getStruct().toString());
}