aboutsummaryrefslogtreecommitdiff
path: root/tests/data/spawn_hint.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/data/spawn_hint.zc')
-rw-r--r--tests/data/spawn_hint.zc11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/data/spawn_hint.zc b/tests/data/spawn_hint.zc
new file mode 100644
index 0000000..b59657d
--- /dev/null
+++ b/tests/data/spawn_hint.zc
@@ -0,0 +1,11 @@
+namespace;
+include rt, actor;
+struct res { int fd; void drop() { rt.put_s("closed"); } }
+actor Echo { int total; int handle(int x) { return x; } }
+fn main() {
+ res* r = rt.new(res); r.fd = 3;
+ Echo* e = rt.new(Echo);
+ e.spawn();
+ e.close();
+ return r.fd;
+}