This commit is contained in:
gingerBill
2017-11-30 19:53:40 +00:00
parent 04cce1826b
commit e00d88d82e
3 changed files with 9 additions and 3 deletions
+2
View File
@@ -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
View File
@@ -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
View File
@@ -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;