2011-11-18 05:39:20 -06:00
|
|
|
fn wrapper3<copy T>(i: T, j: int) {
|
2011-10-12 14:03:30 -05:00
|
|
|
log i;
|
|
|
|
log j;
|
|
|
|
// This is a regression test that the spawn3 thunk to wrapper3
|
|
|
|
// correctly finds the value of j
|
|
|
|
assert j == 123456789;
|
|
|
|
}
|
|
|
|
|
2011-11-18 05:39:20 -06:00
|
|
|
fn spawn3<copy T>(i: T, j: int) {
|
2011-10-12 14:03:30 -05:00
|
|
|
let wrapped = bind wrapper3(i, j);
|
|
|
|
wrapped();
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
spawn3(127u8, 123456789);
|
|
|
|
}
|