Holy, Is this the based department? Is it actually working???
This commit is contained in:
@@ -269,7 +269,7 @@ resolve_expr(Ast_Expr *ast, Ast_Resolved_Type *expected_type, Sym *const_sym){
|
||||
result.is_const = true;
|
||||
}
|
||||
else if(sym->kind == SYM_CONST || sym->kind == SYM_VAR){
|
||||
type_complete(sym->type);
|
||||
// if(sym->type == type_type) type_complete(sym->type_val);
|
||||
result.type = sym->type;
|
||||
result.is_const = sym->kind == SYM_CONST ? true : false;
|
||||
result.value = sym->value;
|
||||
@@ -494,6 +494,7 @@ resolve_binding(Ast *ast, Sym *sym){
|
||||
Ast_Resolved_Type *type = resolve_typespec(node->typespec, AST_CAN_BE_NULL);
|
||||
Operand expr = node->expr ? resolve_expr(node->expr, type) : Operand{};
|
||||
expr.type = resolve_type_pair(node->pos, type, expr.type);
|
||||
type_complete(expr.type);
|
||||
return expr;
|
||||
BREAK();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user