aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-11-21 11:14:29 +0000
committergingerBill <bill@gingerbill.org>2022-11-21 11:14:29 +0000
commit824b97d250dd14f93c0aa0cab058aa0cda25c823 (patch)
tree1b6d4883916e69c96c793b0f9c151e5406095cad /src
parent5bbab051613198cc622170542e20a21f915b2bc7 (diff)
Fix #2197
Diffstat (limited to 'src')
-rw-r--r--src/check_expr.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index 3f555c820..ecd7d4412 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -3372,6 +3372,24 @@ void check_binary_expr(CheckerContext *c, Operand *x, Ast *node, Type *type_hint
error(y->expr, "built-in expression in binary expression");
return;
}
+ if (x->mode == Addressing_ProcGroup) {
+ x->mode = Addressing_Invalid;
+ if (x->proc_group != nullptr) {
+ error(x->expr, "procedure group '%.*s' used in binary expression", LIT(x->proc_group->token.string));
+ } else {
+ error(x->expr, "procedure group used in binary expression");
+ }
+ return;
+ }
+ if (y->mode == Addressing_ProcGroup) {
+ x->mode = Addressing_Invalid;
+ if (x->proc_group != nullptr) {
+ error(y->expr, "procedure group '%.*s' used in binary expression", LIT(y->proc_group->token.string));
+ } else {
+ error(y->expr, "procedure group used in binary expression");
+ }
+ return;
+ }
if (token_is_shift(op.kind)) {
check_shift(c, x, y, node, type_hint);