diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-07-13 22:35:00 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-07-13 22:35:00 +0100 |
| commit | 1c5ddd65b4f66c4d37bd9da0facb229bbcea22eb (patch) | |
| tree | 78078fbb2cf23b31689bb6842ba30e487f199447 /src/check_decl.cpp | |
| parent | b8697fb4ed34d0da0fa0888b57e6edcc37a0ce81 (diff) | |
Rudimentary support for parametric polymorphic types
Diffstat (limited to 'src/check_decl.cpp')
| -rw-r--r-- | src/check_decl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp index 96827590d..7c33cf9e5 100644 --- a/src/check_decl.cpp +++ b/src/check_decl.cpp @@ -558,7 +558,7 @@ void check_var_decl(Checker *c, Entity *e, Entity **entities, isize entity_count if (type_expr != nullptr) { e->type = check_type(c, type_expr); } - if (e->type != nullptr && is_type_polymorphic(e->type)) { + if (e->type != nullptr && is_type_polymorphic(base_type(e->type))) { error(e->token, "Invalid use of a polymorphic type in %.*s", LIT(context_name)); e->type = t_invalid; } |