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

20 lines
203 B
Rust
Raw Normal View History

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