2012-06-01 17:48:07 -07:00
|
|
|
// Test that a class with an unsendable field can't be
|
|
|
|
// sent
|
|
|
|
|
|
|
|
class foo {
|
|
|
|
let i: int;
|
2012-07-13 22:57:48 -07:00
|
|
|
let j: @~str;
|
|
|
|
new(i:int, j: @~str) { self.i = i; self.j = j; }
|
2012-06-01 17:48:07 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2012-07-14 13:55:41 -07:00
|
|
|
let cat = ~"kitty";
|
2012-06-30 12:23:59 +01:00
|
|
|
let po = comm::port(); //~ ERROR missing `send`
|
|
|
|
let ch = comm::chan(po); //~ ERROR missing `send`
|
|
|
|
comm::send(ch, foo(42, @cat)); //~ ERROR missing `send`
|
2012-07-14 13:55:41 -07:00
|
|
|
}
|