rust/src/test/compile-fail/alt-join.rs

12 lines
273 B
Rust
Raw Normal View History

// a good test that we merge paths correctly in the presence of a
// variable that's used before it's declared
fn my_fail() -> ! { fail; }
fn main() {
2012-08-03 19:59:04 -07:00
alt true { false => { my_fail(); } true => { } }
log(debug, x); //~ ERROR unresolved name: x
let x: int;
}