rust/src/test/run-pass/lambda-infer-unresolved.rs

8 lines
228 B
Rust
Raw Normal View History

// 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];
}