rust/src/test/run-fail/expr-if-fail-fn.rs

9 lines
143 B
Rust
Raw Normal View History

2011-06-10 19:27:34 -05:00
// error-pattern:explicit failure
2011-06-10 19:27:34 -05:00
fn f() -> ! { fail }
fn g() -> int { auto x = if (true) { f() } else { 10 }; ret x; }
2011-06-10 19:27:34 -05:00
fn main() { g(); }