rust/src/test/compile-fail/break-uninit2.rs

15 lines
209 B
Rust
Raw Normal View History

2012-03-05 18:27:27 -06:00
// error-pattern:unsatisfied precondition
fn foo() -> int {
2011-07-27 07:19:39 -05:00
let x: int;
let i: int;
2011-07-27 07:19:39 -05:00
do { i = 0; break; x = 0; } while 1 != 2
log(debug, x);
2011-07-27 07:19:39 -05:00
ret 17;
}
fn main() { log(debug, foo()); }