aboutsummaryrefslogtreecommitdiff
path: root/tests/actor/reject/drop_value.zc
blob: 10e941de1a458878098017ed412bdef5e9d724b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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;
}