Fix issue where compounds had not enough type information to typecheck

This commit is contained in:
Krzosa Karol
2022-06-14 20:42:32 +02:00
parent 107c8435b7
commit a4513fcdfa
6 changed files with 59 additions and 18 deletions

12
ast.cpp
View File

@@ -77,18 +77,6 @@ struct Ast_Expr:Ast{
};
};
#define VALUE_FIELDS \
Ast_Type *type; \
union{ \
bool bool_val; \
F64 f64_val; \
Intern_String intern_val; \
BigInt big_int_val;\
Ast_Type *type_val; \
};
#define INLINE_VALUE_FIELDS union{Value value; struct{VALUE_FIELDS};}
struct Value{VALUE_FIELDS};
struct Ast_Atom: Ast_Expr{
Ast_Decl *resolved_decl;
INLINE_VALUE_FIELDS;