blob: b421f8cdf2ef14bc392060736130f29f0c403b47 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
// 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'));
}
|