diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-03-12 16:42:51 +0000 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-03-12 16:42:51 +0000 |
| commit | aaec8bf423a40f887d43d12403c2e40f187d424c (patch) | |
| tree | 98958a8c7db53197a0176fcc7607bdcad0a4d8c3 /src/checker.c | |
| parent | 0fcbda951aea462248304a7e16f5c4eb9da9939d (diff) | |
windows.odin TYPE_NAME to Type_Name; More SSA work and SSA printing for debugging
Diffstat (limited to 'src/checker.c')
| -rw-r--r-- | src/checker.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/checker.c b/src/checker.c index 2e2eceefc..881e86c8b 100644 --- a/src/checker.c +++ b/src/checker.c @@ -816,7 +816,7 @@ bool add_entity(Checker *c, Scope *scope, AstNode *identifier, Entity *entity) { return false; } error(entity->token, - "Redeclararation of `%.*s` in this scope through `using`\n" + "Redeclaration of `%.*s` in this scope through `using`\n" "\tat %.*s(%td:%td)", LIT(name), LIT(up->token.pos.file), up->token.pos.line, up->token.pos.column); @@ -827,7 +827,7 @@ bool add_entity(Checker *c, Scope *scope, AstNode *identifier, Entity *entity) { return false; } error(entity->token, - "Redeclararation of `%.*s` in this scope\n" + "Redeclaration of `%.*s` in this scope\n" "\tat %.*s(%td:%td)", LIT(name), LIT(pos.file), pos.line, pos.column); @@ -1467,7 +1467,12 @@ void check_collect_entities(Checker *c, AstNodeArray nodes, bool is_file_scope) // TODO(bill): What if vd->type != NULL??? How to handle this case? d->type_expr = init; d->init_expr = init; - } else if (init != NULL && up_init->kind == AstNode_ProcLit) { + } else if (up_init != NULL && up_init->kind == AstNode_Alias) { + error_node(up_init, "#alias declarations are not yet supported"); + continue; + // e = make_entity_alias(c->allocator, d->scope, name->Ident, NULL, NULL); + // d->init_expr = init->Alias.expr; + }else if (init != NULL && up_init->kind == AstNode_ProcLit) { e = make_entity_procedure(c->allocator, d->scope, name->Ident, NULL, up_init->ProcLit.tags); d->proc_lit = up_init; d->type_expr = vd->type; |