Fix polymorphic record "too few" lacking error message

This commit is contained in:
gingerBill
2021-05-31 20:33:14 +01:00
parent bc4591fc1e
commit 4d80f8598d
3 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -937,7 +937,7 @@ Type *type_of_expr(Ast *expr) {
}
Entity *implicit_entity_of_node(Ast *clause) {
if (clause->kind == Ast_CaseClause) {
if (clause != nullptr && clause->kind == Ast_CaseClause) {
return clause->CaseClause.implicit_entity;
}
return nullptr;