rust/src/test/run-pass/clone-with-exterior.rs

18 lines
290 B
Rust
Raw Normal View History

//xfail-stage0
//xfail-stage1
//xfail-stage2
//xfail-stage3
use std;
import std::task;
fn f(x : @{a:int, b:int}) {
assert (x.a == 10);
assert (x.b == 12);
2011-07-27 07:48:34 -05:00
}
fn main() {
let z : @{a:int, b:int} = @{ a : 10, b : 12};
let p = task::_spawn(bind f(z));
task::join_id(p);
2011-07-27 07:48:34 -05:00
}