rust/src/test/run-pass/lambda-infer-unresolved.rs
Brian Anderson 518dc52f85 Reformat
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00

8 lines
228 B
Rust

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