rust/src/test/run-pass/lambda-infer-unresolved.rs
2012-03-26 18:35:18 -07:00

8 lines
222 B
Rust

// This should typecheck even though the type of e is not fully
// resolved when we finish typechecking the fn@.
fn main() {
let e = @{mut refs: [], n: 0};
let f = fn@ () { log(error, e.n); };
e.refs += [1];
}