Fix: Recover boolean test flag after visiting subexpressions (#13909)

Co-authored-by: xbrtnik1 <524841@mail.muni.cz>
This commit is contained in:
Lokejoke 2024-11-05 20:55:49 +01:00 committed by GitHub
parent 2b76fa8fa1
commit abafeb4bee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1535,7 +1535,6 @@ impl<'a> Visitor<'a> for Checker<'a> {
}; };
// Step 4: Analysis // Step 4: Analysis
analyze::expression(expr, self);
match expr { match expr {
Expr::StringLiteral(string_literal) => { Expr::StringLiteral(string_literal) => {
analyze::string_like(string_literal.into(), self); analyze::string_like(string_literal.into(), self);
@ -1546,6 +1545,7 @@ impl<'a> Visitor<'a> for Checker<'a> {
} }
self.semantic.flags = flags_snapshot; self.semantic.flags = flags_snapshot;
analyze::expression(expr, self);
self.semantic.pop_node(); self.semantic.pop_node();
} }