Skip to content

Commit 2e3b987

Browse files
Update isStartOfConditionalStmtBody to check for oper_binary_unspaced
1 parent fe0e683 commit 2e3b987

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Parse/ParseStmt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1887,7 +1887,7 @@ bool Parser::isStartOfConditionalStmtBody() {
18871887
// print("body") }
18881888
return false;
18891889
}
1890-
if (Tok.is(tok::oper_binary_spaced)) {
1890+
if (Tok.is(tok::oper_binary_spaced) || Tok.is(tok::oper_binary_unspaced)) {
18911891
// If current token is a binary operator this can't be the statement body
18921892
// since an `if` expression can't be the left-hand side of an operator,
18931893
// e.g. if true, { true }

0 commit comments

Comments
 (0)