aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2018-05-27 00:10:38 +0100
committergingerBill <bill@gingerbill.org>2018-05-27 00:10:38 +0100
commiteb11edabe092541144cd3ba18b09bd11fcf7a958 (patch)
tree597112318141fb292872f9286e775ff66f5da797 /src/check_expr.cpp
parentc067b90403ab8493daa0bf5867b2bd92319feea5 (diff)
Add file scopes for the packages
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 34337ce0e..9e7e2da60 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -342,18 +342,17 @@ bool find_or_generate_polymorphic_procedure(Checker *c, Entity *base_entity, Typ
// NOTE(bill): Set the scope afterwards as this is not real overloading
entity->scope = scope->parent;
- AstPackage *package = nullptr;
+ AstFile *file = nullptr;
{
Scope *s = entity->scope;
- while (s != nullptr && s->package == nullptr) {
- package = s->package;
+ while (s != nullptr && s->file == nullptr) {
+ file = s->file;
s = s->parent;
}
}
ProcedureInfo proc_info = {};
- // proc_info.file = file;
- proc_info.package = package;
+ proc_info.file = file;
proc_info.token = token;
proc_info.decl = d;
proc_info.type = final_proc_type;
@@ -5363,7 +5362,7 @@ ExprKind check_expr_base_internal(Checker *c, Operand *o, AstNode *node, Type *t
return kind;
}
- check_procedure_later(c, c->curr_ast_package, empty_token, decl, type, pl->body, pl->tags);
+ check_procedure_later(c, c->curr_ast_file, empty_token, decl, type, pl->body, pl->tags);
}
check_close_scope(c);