rust/src/test/run-pass/issue-912.rs
Tim Chevalier b8710de5ff Add test cases
issue-912 is xfailed. issue-2111 is already fixed, but it's good to
have the test case.
2012-06-21 19:58:52 -07:00

9 lines
184 B
Rust

// xfail-test
fn find<T>(_f: fn(@T) -> bool, _v: [@T]) {}
fn main() {
let x = 10, arr = [];
find({|f| f.id == x}, arr);
arr += [{id: 20}]; // This assigns a type to arr
}