Fix Issue with referencing a polymorphic struct in another package referencing itself #283

This commit is contained in:
gingerBill
2018-11-25 10:35:49 +00:00
parent 4c2f03b1f2
commit 0a4b88f9a6
3 changed files with 37 additions and 8 deletions
+6
View File
@@ -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);