rust/src/test/compile-fail/use-uninit-3.rs

6 lines
148 B
Rust
Raw Normal View History

// error-pattern:Unsatisfied precondition
2010-07-08 09:33:25 -05:00
2011-07-27 07:19:39 -05:00
fn foo(x: int) { log x; }
2010-07-08 09:33:25 -05:00
fn main() { let x: int; if 1 > 2 { log "whoops"; } else { x = 10; } foo(x); }