aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-22 13:07:20 +0200
committerlemon <lsof@mailbox.org>2022-08-22 13:07:20 +0200
commitc9bcf39a2ad78c7bc9cbfaab43e03771899cfa44 (patch)
treebd3c305a3d6b558fde1f04e9683d0f97bb4f8620 /bootstrap
parent135e66c64adf0ef5d2723c243d2f2f6a059ae753 (diff)
ir
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bootstrap/parse.c b/bootstrap/parse.c
index 91c7567..99d317a 100644
--- a/bootstrap/parse.c
+++ b/bootstrap/parse.c
@@ -1809,7 +1809,7 @@ pexlog(struct parser *P) {
struct expr rhs = pexcmp(P);
if (tokt == '?\?') {
const struct type *ty = typeof2(ex.ty, rhs.ty);
- if (ex.ty->t != TYptr || rhs.ty->t != TYptr || !ty)
+ if (!(ex.ty->t == TYptr || rhs.ty->t == TYptr) || !ty)
fatal(P, tok.span,
"invalid operands %t and %t to binary operator %k",
ex.ty, rhs.ty, tok.t);