rust/src/test/run-pass/sendable-class.rs
2012-06-01 20:40:35 -07:00

13 lines
258 B
Rust

// Test that a class with only sendable fields can be sent
class foo {
let i: int;
let j: char;
new(i:int, j: char) { self.i = i; self.j = j; }
}
fn main() {
let po = comm::port::<foo>();
let ch = comm::chan(po);
comm::send(ch, foo(42, 'c'));
}