aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp4
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 {