blob: 1db5dff3bf825106d2ec466ab440b574809f24ca [file] [log] [blame]
//@ check-pass
// In PR 71930, it was discovered that the code to retrieve the inferred type of a match scrutinee
// was incorrect.
fn f() -> ! {
panic!()
}
fn g() -> usize {
match f() { // Should infer type `bool`
false => 0,
true => 1,
}
}
fn h() -> usize {
match f() { // Should infer type `!`
}
}
fn main() {}