aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-06-10 15:09:04 +0100
committergingerBill <bill@gingerbill.org>2020-06-10 15:09:04 +0100
commite86fde3cb16d2977054aa727c32cd4efcb1bd8a7 (patch)
tree0a6c76afcbecffef255fd2ce6d50758d2f900d36 /src/check_expr.cpp
parent99944f3b02dd8aef610bdc19e31a790939e29cdd (diff)
Fix #648
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index c38bec9b7..a52295298 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -3492,7 +3492,14 @@ Entity *check_selector(CheckerContext *c, Operand *operand, Ast *node, Type *typ
}
check_entity_decl(c, entity, nullptr, nullptr);
- GB_ASSERT(entity->type != nullptr);
+ if (entity->kind == Entity_ProcGroup) {
+ operand->mode = Addressing_ProcGroup;
+ operand->proc_group = entity;
+
+ add_type_and_value(c->info, operand->expr, operand->mode, operand->type, operand->value);
+ return entity;
+ }
+ GB_ASSERT_MSG(entity->type != nullptr, "%.*s (%.*s)", LIT(entity->token.string), LIT(entity_strings[entity->kind]));
if (!is_entity_exported(entity, allow_builtin)) {
gbString sel_str = expr_to_string(selector);