diff options
| author | gingerBill <bill@gingerbill.org> | 2017-12-03 23:19:25 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-12-03 23:19:25 +0000 |
| commit | 05ad38ae2d8808ba09f9c8d41480e780b20ada85 (patch) | |
| tree | 6c588864c1ccc1f1ee76e70f46289f2187c612b5 /src | |
| parent | 596a2c835554a26cb0ad1f83892a3a11c04bad25 (diff) | |
Fix procedure grouping
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_expr.cpp | 5 | ||||
| -rw-r--r-- | src/checker.cpp | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 36419d172..21a4f7cfe 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -999,6 +999,11 @@ Entity *check_ident(Checker *c, Operand *o, AstNode *n, Type *named_type, Type * if (e->kind == Entity_ProcedureGrouping) { auto *pge = &e->ProcedureGrouping; + + DeclInfo *d = decl_info_of_entity(&c->info, e); + check_entity_decl(c, e, d, nullptr); + + Entity **procs = pge->entities.data; isize overload_count = pge->entities.count; bool skip = false; diff --git a/src/checker.cpp b/src/checker.cpp index 41faba7c0..78afab4ad 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -1472,7 +1472,7 @@ PtrSet<Entity *> generate_minimum_dependency_set(CheckerInfo *info, Entity *star Entity *e = info->definitions.entries[i].value; // if (e->scope->is_global && !is_type_poly_proc(e->type)) { // TODO(bill): is the check enough? if (e->scope->is_global) { // TODO(bill): is the check enough? - if (!is_type_poly_proc(e->type)) { + if (e->type == nullptr || !is_type_poly_proc(e->type)) { // NOTE(bill): Require runtime stuff add_dependency_to_map(&map, info, e); } |