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

View file

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