Fix compilation error for Invalid EntityKind

This commit is contained in:
Ginger Bill
2017-06-13 18:04:22 +01:00
parent 6a88dc322a
commit e7fc24e48c
+5 -1
View File
@@ -1554,6 +1554,10 @@ Entity *check_ident(Checker *c, Operand *o, AstNode *n, Type *named_type, Type *
o->mode = Addressing_Builtin; o->mode = Addressing_Builtin;
break; break;
case Entity_TypeName:
o->mode = Addressing_Type;
break;
case Entity_ImportName: case Entity_ImportName:
if (!allow_import_name) { if (!allow_import_name) {
error_node(n, "Use of import `%.*s` not in selector", LIT(name)); error_node(n, "Use of import `%.*s` not in selector", LIT(name));
@@ -1572,7 +1576,7 @@ Entity *check_ident(Checker *c, Operand *o, AstNode *n, Type *named_type, Type *
break; break;
default: default:
compiler_error("Unknown EntityKind"); compiler_error("Unknown EntityKind %.*s", LIT(entity_strings[e->kind]));
break; break;
} }