diff options
| author | 2026-10-15 02:37:04 +0330 | |
|---|---|---|
| committer | 2026-10-15 02:40:51 +0330 | |
| commit | b02bdd043673419357eadd6c646b9a77c62e5792 (patch) | |
| tree | 629a8b700ecf64f19d70d2a6b00aa3eb79ade004 /tests/data | |
| parent | destructors: nothing moves out of a value with a drop: pop on an array with a... (diff) | |
destructors: hint: x: has drop and is live at spawn; the worker's copy drops it too, on x.spawn() of a mailbox struct for each live owned local with a drop; spec 6.15.4, lsp hint check
Diffstat (limited to 'tests/data')
| -rw-r--r-- | tests/data/spawn_hint.zc | 11 |
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; +} |
