Skip to content

Commit

Permalink
Visit pattern match guard as a boolean test (#7911)
Browse files Browse the repository at this point in the history
  • Loading branch information
harupy committed Oct 11, 2023
1 parent ec9d5cd commit 8c4b5d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ruff_linter/src/checkers/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ where
fn visit_match_case(&mut self, match_case: &'b MatchCase) {
self.visit_pattern(&match_case.pattern);
if let Some(expr) = &match_case.guard {
self.visit_expr(expr);
self.visit_boolean_test(expr);
}

self.semantic.push_branch();
Expand Down

0 comments on commit 8c4b5d3

Please sign in to comment.