diff options
| author | gingerBill <bill@gingerbill.org> | 2018-11-25 10:35:49 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-11-25 10:35:49 +0000 |
| commit | 0a4b88f9a682b08a11f9569c88549855793f0be8 (patch) | |
| tree | fd0e2c51efd7fa997e193491e14bd4f9d158ec40 /src/check_type.cpp | |
| parent | 4c2f03b1f26bf9d9ec986bb2284e4daa9b4a95aa (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.cpp | 6 |
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); |