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