rust/src/test/compile-fail/liveness-init-in-called-fn-expr.rs

8 lines
149 B
Rust
Raw Normal View History

fn main() {
let j = fn@() -> int {
let i: int;
2012-08-01 19:30:05 -05:00
return i; //~ ERROR use of possibly uninitialized variable: `i`
};
j();
}