Browse Source

Try to fix internal compiler error in #208

gingerBill 7 years ago
parent
commit
fc77b5b4ac
1 changed files with 3 additions and 4 deletions
  1. 3 4
      src/check_expr.cpp

+ 3 - 4
src/check_expr.cpp

@@ -1016,10 +1016,9 @@ Entity *check_ident(Checker *c, Operand *o, AstNode *n, Type *named_type, Type *
 
 
 	if (e->type == nullptr) {
-		if (e->state == EntityState_Unresolved) {
-			return nullptr;
-		}
-		compiler_error("How did this happen? type: %s; identifier: %.*s\n", type_to_string(e->type), LIT(name));
+		// TODO(bill): Which is correct? return or compiler_error?
+		// compiler_error("How did this happen? type: %s; identifier: %.*s\n", type_to_string(e->type), LIT(name));
+		return nullptr;
 	}
 
 	e->flags |= EntityFlag_Used;