mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Fix issue #157
This commit is contained in:
@@ -623,6 +623,7 @@ void check_assignment(Checker *c, Operand *operand, Type *type, String context_n
|
|||||||
if (operand->mode == Addressing_Invalid) {
|
if (operand->mode == Addressing_Invalid) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (operand->mode == Addressing_Type) {
|
if (operand->mode == Addressing_Type) {
|
||||||
Type *t = base_type(type);
|
Type *t = base_type(type);
|
||||||
@@ -665,6 +666,7 @@ void check_assignment(Checker *c, Operand *operand, Type *type, String context_n
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (type == nullptr) {
|
if (type == nullptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-2
@@ -178,8 +178,12 @@ bool check_is_terminating(AstNode *node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Type *check_assignment_variable(Checker *c, Operand *lhs, Operand *rhs) {
|
Type *check_assignment_variable(Checker *c, Operand *lhs, Operand *rhs) {
|
||||||
if (rhs->mode == Addressing_Invalid ||
|
if (rhs->mode == Addressing_Invalid) {
|
||||||
(rhs->type == t_invalid && rhs->mode != Addressing_Overload)) {
|
return nullptr;
|
||||||
|
}
|
||||||
|
if (rhs->type == t_invalid &&
|
||||||
|
rhs->mode != Addressing_Overload &&
|
||||||
|
rhs->mode != Addressing_Builtin) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4828,7 +4828,7 @@ irValue *ir_build_expr(irProcedure *proc, AstNode *expr) {
|
|||||||
GB_ASSERT_MSG(e != nullptr, "%s", expr_to_string(expr));
|
GB_ASSERT_MSG(e != nullptr, "%s", expr_to_string(expr));
|
||||||
if (e->kind == Entity_Builtin) {
|
if (e->kind == Entity_Builtin) {
|
||||||
Token token = ast_node_token(expr);
|
Token token = ast_node_token(expr);
|
||||||
GB_PANIC("TODO(bill): ir_build_single_expr Entity_Builtin '%.*s'\n"
|
GB_PANIC("TODO(bill): ir_build_expr Entity_Builtin '%.*s'\n"
|
||||||
"\t at %.*s(%td:%td)", LIT(builtin_procs[e->Builtin.id].name),
|
"\t at %.*s(%td:%td)", LIT(builtin_procs[e->Builtin.id].name),
|
||||||
LIT(token.pos.file), token.pos.line, token.pos.column);
|
LIT(token.pos.file), token.pos.line, token.pos.column);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user