diff options
Diffstat (limited to 'tests/actor/reject/drop_value.zc')
| -rw-r--r-- | tests/actor/reject/drop_value.zc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/actor/reject/drop_value.zc b/tests/actor/reject/drop_value.zc new file mode 100644 index 0000000..10e941d --- /dev/null +++ b/tests/actor/reject/drop_value.zc @@ -0,0 +1,12 @@ +// destructors 7: a value whose own drop is set can't be copied into an actor message either +namespace; +include rt, actor; +actor Echo { int handle(int* p) { return *p; } } +fn main() { + Echo* e = rt.new(Echo); + int* p = rt.new(int); p.drop = fn() { rt.put_s("dropped"); }; + e.spawn(); + e.send(p); + e.close(); + return 0; +} |
