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

View File

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