mirror of https://github.com/astral-sh/ruff
Visit pattern match guard as a boolean test (#7911)
This commit is contained in:
parent
ec9d5cddd6
commit
8c4b5d3c90
|
|
@ -1367,7 +1367,7 @@ where
|
||||||
fn visit_match_case(&mut self, match_case: &'b MatchCase) {
|
fn visit_match_case(&mut self, match_case: &'b MatchCase) {
|
||||||
self.visit_pattern(&match_case.pattern);
|
self.visit_pattern(&match_case.pattern);
|
||||||
if let Some(expr) = &match_case.guard {
|
if let Some(expr) = &match_case.guard {
|
||||||
self.visit_expr(expr);
|
self.visit_boolean_test(expr);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.semantic.push_branch();
|
self.semantic.push_branch();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue