Visit pattern match guard as a boolean test (#7911)

This commit is contained in:
Harutaka Kawamura 2023-10-11 22:26:10 +09:00 committed by GitHub
parent ec9d5cddd6
commit 8c4b5d3c90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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();