From b02bdd043673419357eadd6c646b9a77c62e5792 Mon Sep 17 00:00:00 2001 From: zinc Date: Thu, 15 Oct 2026 02:37:04 +0330 Subject: 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 --- src/compiler/expr.zc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/compiler/expr.zc') diff --git a/src/compiler/expr.zc b/src/compiler/expr.zc index 7687394..1cd765b 100644 --- a/src/compiler/expr.zc +++ b/src/compiler/expr.zc @@ -1199,6 +1199,7 @@ word field(int c) { st = xty; if (rt.eq_w(n, "drop") && (is_op(s_lp) || is_op(s_eq)) && (isptr(st) || st == tword) && !(isptr(st) && st[4][0] == TY_STRUCT && tfindfield(st[4], n) >= 0)) return drop_member(c, borrowed); if (rt.eq_w(n, "send") && is_op(s_lp) && isptr(st) && st[4][0] == TY_STRUCT && tfindfield(st[4], intern("__mailbox")) >= 0) send_check = 1; + if (rt.eq_w(n, "spawn") && is_op(s_lp) && isptr(st) && st[4][0] == TY_STRUCT && tfindfield(st[4], intern("__mailbox")) >= 0) spawn_hint(); if (st[0] == TY_ARR || st[0] == TY_DYN) { if (pmatch) probe_member(st); if (is_op(s_lp) && array_method(n)) { xaf = borrowed; return array_member(c, n); } -- cgit v1.2.3