This commit is contained in:
gingerBill
2022-11-21 11:14:29 +00:00
parent 5bbab05161
commit 824b97d250

View File

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