aboutsummaryrefslogtreecommitdiff
path: root/src/check_type.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-11-25 10:35:49 +0000
committergingerBill <bill@gingerbill.org>2018-11-25 10:35:49 +0000
commit0a4b88f9a682b08a11f9569c88549855793f0be8 (patch)
treefd0e2c51efd7fa997e193491e14bd4f9d158ec40 /src/check_type.cpp
parent4c2f03b1f26bf9d9ec986bb2284e4daa9b4a95aa (diff)
Fix Issue with referencing a polymorphic struct in another package referencing itself #283
Diffstat (limited to 'src/check_type.cpp')
-rw-r--r--src/check_type.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/check_type.cpp b/src/check_type.cpp
index 88c9e4bcf..235aaec71 100644
--- a/src/check_type.cpp
+++ b/src/check_type.cpp
@@ -2521,6 +2521,12 @@ Type *check_type_expr(CheckerContext *ctx, Ast *e, Type *named_type) {
type->Named.base = t_invalid;
}
+ if (is_type_polymorphic(type)) {
+ type->flags |= TypeFlag_Polymorphic;
+ } else if (is_type_polymorphic(type, true)) {
+ type->flags |= TypeFlag_PolySpecialized;
+ }
+
#if 0
if (!ctx->allow_polymorphic_types && is_type_polymorphic(type)) {
gbString str = type_to_string(type);