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;
|
result.is_const = true;
|
||||||
}
|
}
|
||||||
else if(sym->kind == SYM_CONST || sym->kind == SYM_VAR){
|
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.type = sym->type;
|
||||||
result.is_const = sym->kind == SYM_CONST ? true : false;
|
result.is_const = sym->kind == SYM_CONST ? true : false;
|
||||||
result.value = sym->value;
|
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);
|
Ast_Resolved_Type *type = resolve_typespec(node->typespec, AST_CAN_BE_NULL);
|
||||||
Operand expr = node->expr ? resolve_expr(node->expr, type) : Operand{};
|
Operand expr = node->expr ? resolve_expr(node->expr, type) : Operand{};
|
||||||
expr.type = resolve_type_pair(node->pos, type, expr.type);
|
expr.type = resolve_type_pair(node->pos, type, expr.type);
|
||||||
|
type_complete(expr.type);
|
||||||
return expr;
|
return expr;
|
||||||
BREAK();
|
BREAK();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
|
|
||||||
arena_pointer: *Arena = null
|
arena_pointer: *Arena = null
|
||||||
|
thing: Arena
|
||||||
|
no_type := thing
|
||||||
|
|
||||||
Arena :: struct
|
Arena :: struct
|
||||||
|
// arena: Arena
|
||||||
next: *Arena
|
next: *Arena
|
||||||
data: *int
|
data: *int
|
||||||
len : int
|
len : int
|
||||||
@@ -12,8 +16,6 @@ String16 :: struct
|
|||||||
data: *void
|
data: *void
|
||||||
len : int
|
len : int
|
||||||
|
|
||||||
thing: Arena
|
|
||||||
no_type := thing
|
|
||||||
with_type: Arena = thing
|
with_type: Arena = thing
|
||||||
pointer := &with_type
|
pointer := &with_type
|
||||||
deref := *pointer
|
deref := *pointer
|
||||||
|
|||||||
Reference in New Issue
Block a user