rust/src/test/compile-fail/break-uninit2.rs
2012-03-05 17:05:20 -08:00

15 lines
209 B
Rust

// error-pattern:unsatisfied precondition
fn foo() -> int {
let x: int;
let i: int;
do { i = 0; break; x = 0; } while 1 != 2
log(debug, x);
ret 17;
}
fn main() { log(debug, foo()); }