Nested procedures are declared inline but bodies checked later

This commit is contained in:
Ginger Bill
2016-09-24 23:48:03 +01:00
parent 70f3361a34
commit 349badcf17
3 changed files with 28 additions and 58 deletions

View File

@@ -805,9 +805,7 @@ void check_identifier(Checker *c, Operand *o, AstNode *n, Type *named_type, Cycl
if (n->Ident.string == make_string("_")) {
error(n->Ident, "`_` cannot be used as a value type");
} else {
auto *entries = c->context.scope->elements.entries;
error(n->Ident,
"Undeclared name: %.*s", LIT(n->Ident.string));
error(n->Ident, "Undeclared name: %.*s", LIT(n->Ident.string));
}
o->type = t_invalid;
o->mode = Addressing_Invalid;