Fix issue #63 for block comments not terminating at an EOF

This commit is contained in:
Ginger Bill
2017-05-09 10:01:10 +01:00
parent 7692061eef
commit 64b5afd820
8 changed files with 45 additions and 33 deletions
+10
View File
@@ -1208,6 +1208,16 @@ Entity *check_ident(Checker *c, Operand *o, AstNode *n, Type *named_type, Type *
}
return NULL;
}
if (e->parent_proc_decl != NULL &&
e->parent_proc_decl != c->context.curr_proc_decl) {
if (e->kind == Entity_Variable) {
error(n->Ident, "Nested procedures do not capture its parent's variables: %.*s", LIT(name));
return NULL;
} else if (e->kind == Entity_Label) {
error(n->Ident, "Nested procedures do not capture its parent's labels: %.*s", LIT(name));
return NULL;
}
}
bool is_overloaded = false;
isize overload_count = 0;