summary refs log tree commit diff
path: root/src/test/run-pass/bind-generic.rs
blob: 579b304f839e9abe602a66fc04c4f46cd6402200 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fn wrapper3<T: copy>(i: T, j: int) {
    log(debug, i);
    log(debug, j);
    // This is a regression test that the spawn3 thunk to wrapper3
    // correctly finds the value of j
    assert j == 123456789;
}

fn spawn3<T: copy>(i: T, j: int) {
    let wrapped = bind wrapper3(i, j);
    wrapped();
}

fn main() {
    spawn3(127u8, 123456789);
}