diff options
| author | gingerBill <bill@gingerbill.org> | 2019-10-31 22:58:38 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-10-31 22:58:38 +0000 |
| commit | a20c31d6b509076141fe69f33d2fe3b465122f78 (patch) | |
| tree | ac58769b8c21bc5df981c1cf5f0e74589a2b2082 /src/check_type.cpp | |
| parent | 560bdc339b1137ab6f52878a13dce0a4742b6153 (diff) | |
Fix polymorphic record parameter determination bug caused by polymorphic constants not being handled correctly #447
Diffstat (limited to 'src/check_type.cpp')
| -rw-r--r-- | src/check_type.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp index cf5855a3e..9f8310e44 100644 --- a/src/check_type.cpp +++ b/src/check_type.cpp @@ -461,6 +461,10 @@ void check_struct_type(CheckerContext *ctx, Type *struct_type, Ast *node, Array< e = alloc_entity_type_name(scope, token, operand.type); e->TypeName.is_type_alias = true; } else { + if (is_type_polymorphic(base_type(operand.type))) { + is_polymorphic = true; + can_check_fields = false; + } e = alloc_entity_constant(scope, token, operand.type, operand.value); } } else { |