2019-07-27 00:54:25 +03:00
|
|
|
//@ run-pass
|
2014-10-09 15:17:22 -04:00
|
|
|
// When all branches of an if expression result in panic, the entire if
|
|
|
|
|
// expression results in panic.
|
2015-03-22 13:13:15 -07:00
|
|
|
|
2013-08-17 08:37:42 -07:00
|
|
|
pub fn main() {
|
|
|
|
|
let _x = if true {
|
2015-01-25 22:05:03 +01:00
|
|
|
10
|
2013-08-17 08:37:42 -07:00
|
|
|
} else {
|
2014-10-09 15:17:22 -04:00
|
|
|
if true { panic!() } else { panic!() }
|
2013-08-17 08:37:42 -07:00
|
|
|
};
|
|
|
|
|
}
|