rust/src/test/run-pass/expr-if-fail-all.rs

3 lines
179 B
Rust
Raw Normal View History

// When all branches of an if expression result in fail, the entire if
// expression results in fail.
2011-07-27 07:19:39 -05:00
fn main() { let x = if true { 10 } else { if true { fail } else { fail } }; }