Holy, Is this the based department? Is it actually working???

This commit is contained in:
Krzosa Karol
2022-05-29 22:19:37 +02:00
parent 4434ad1fb5
commit 3f44a533be
2 changed files with 6 additions and 3 deletions

View File

@@ -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();
}