Skip to content

Commit 4be28f0

Browse files
Update checkother.cpp
1 parent c524609 commit 4be28f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/checkother.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ void CheckOther::checkVariableScope()
12901290
tok = tok->link();
12911291

12921292
// parse else if blocks..
1293-
} else if (Token::simpleMatch(tok, "else { if (") && Token::simpleMatch(tok->linkAt(3), ") {")) {
1293+
} else if (Token::simpleMatch(tok, "else { if (") && tok->next()->isSimplifiedScope() && Token::simpleMatch(tok->linkAt(3), ") {")) {
12941294
tok = tok->next();
12951295
} else if (tok->varId() == var->declarationId() || tok->str() == "goto") {
12961296
reduce = false;

0 commit comments

Comments
 (0)