diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-07-29 13:01:28 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-07-29 13:01:28 +0100 |
| commit | 3546391311d84376a758ee0fcc806e192d6a18ce (patch) | |
| tree | f8b68340491e86192b8acbe6e7287a8236fed127 /src/checker.cpp | |
| parent | 24c812115e8cbc905b1a5c1d73182da5db94dfde (diff) | |
| parent | 28be0ad69b98868c5a77f0fe9d2898391b1ac400 (diff) | |
Merge branch 'master' of https://github.com/gingerBill/Odin
Diffstat (limited to 'src/checker.cpp')
| -rw-r--r-- | src/checker.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/checker.cpp b/src/checker.cpp index 47b720736..d8da08dc9 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -1734,7 +1734,8 @@ void check_collect_entities(Checker *c, Array<AstNode *> nodes, bool is_file_sco DeclInfo *d = make_declaration_info(c->allocator, c->context.scope, c->context.decl); Entity *e = nullptr; - if (is_ast_node_type(init)) { + if (is_ast_node_type(init) || + (vd->type != nullptr && vd->type->kind == AstNode_TypeType)) { e = make_entity_type_name(c->allocator, d->scope, token, nullptr); if (vd->type != nullptr) { error(name, "A type declaration cannot have an type parameter"); |