summary refs log tree commit diff
path: root/src/test/run-pass/issue-912.rs
blob: 77a349b4ec9bc75a59e10ac5d65a656025c54a0a (plain)
1
2
3
4
5
6
7
8
// 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
}