rust/src/test/run-fail/expr-if-fail-fn.rs
2012-08-01 19:16:06 -07:00

10 lines
144 B
Rust

// error-pattern:explicit failure
fn f() -> ! { fail }
fn g() -> int { let x = if true { f() } else { 10 }; return x; }
fn main() { g(); }