This commit is contained in:
gingerBill
2020-06-10 15:09:04 +01:00
parent 99944f3b02
commit e86fde3cb1
3 changed files with 23 additions and 2 deletions

View File

@@ -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);