Add file scopes for the packages

This commit is contained in:
gingerBill
2018-05-27 00:10:38 +01:00
parent c067b90403
commit eb11edabe0
8 changed files with 136 additions and 154 deletions

View File

@@ -1487,7 +1487,7 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) {
}
if (entity == nullptr) {
entity = alloc_entity_dummy_variable(c->global_scope, ast_node_token(name));
entity = alloc_entity_dummy_variable(universal_scope, ast_node_token(name));
}
entities[entity_count++] = entity;
@@ -1821,7 +1821,7 @@ void check_stmt_internal(Checker *c, AstNode *node, u32 flags) {
}
}
if (entity == nullptr) {
entity = alloc_entity_dummy_variable(c->global_scope, ast_node_token(name));
entity = alloc_entity_dummy_variable(universal_scope, ast_node_token(name));
}
entity->parent_proc_decl = c->context.curr_proc_decl;
entities[entity_count++] = entity;