mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-20 12:44:59 -07: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) {
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (operand->mode == Addressing_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) {
|
||||
return;
|
||||
}
|
||||
|
||||
+6
-2
@@ -178,8 +178,12 @@ bool check_is_terminating(AstNode *node) {
|
||||
}
|
||||
|
||||
Type *check_assignment_variable(Checker *c, Operand *lhs, Operand *rhs) {
|
||||
if (rhs->mode == Addressing_Invalid ||
|
||||
(rhs->type == t_invalid && rhs->mode != Addressing_Overload)) {
|
||||
if (rhs->mode == Addressing_Invalid) {
|
||||
return nullptr;
|
||||
}
|
||||
if (rhs->type == t_invalid &&
|
||||
rhs->mode != Addressing_Overload &&
|
||||
rhs->mode != Addressing_Builtin) {
|
||||
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));
|
||||
if (e->kind == Entity_Builtin) {
|
||||
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),
|
||||
LIT(token.pos.file), token.pos.line, token.pos.column);
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user