aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-09-01 15:11:53 +0100
committergingerBill <bill@gingerbill.org>2022-09-01 15:11:53 +0100
commited73441a4c2a3828626709d807b70bbd53b7a161 (patch)
treef34b89aba8c86f04a044e453b981f20e2067b670 /src/check_expr.cpp
parent4c5672119a815f602750884add64c6888b15c193 (diff)
Fix code generation related to Objective-C related `x->y()` calls
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 9c2d20781..54dc081cf 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -8769,7 +8769,10 @@ ExprKind check_selector_call_expr(CheckerContext *c, Operand *o, Ast *node, Type
Ast *first_arg = x.expr->SelectorExpr.expr;
GB_ASSERT(first_arg != nullptr);
- first_arg->state_flags |= StateFlag_SelectorCallExpr;
+ Entity *e = entity_of_node(se->expr);
+ if (!(e != nullptr && (e->kind == Entity_Procedure || e->kind == Entity_ProcGroup))) {
+ first_arg->state_flags |= StateFlag_SelectorCallExpr;
+ }
Type *pt = base_type(x.type);
GB_ASSERT(pt->kind == Type_Proc);