Improve effect propagation by skipping hooks in trackCall (#25940)

ref https://github.com/nim-lang/Nim/pull/25731
don't propagate effects for assignment hooks without effect lists
This commit is contained in:
ringabout
2026-06-27 01:57:03 +08:00
committed by GitHub
parent 5688a122f1
commit 6828effd13
2 changed files with 12 additions and 2 deletions

View File

@@ -13,4 +13,12 @@ proc send(x: string) =
let wrapper = Thing(x: x)
discard isolate(wrapper)
send("la")
send("la")
block:
func enqueue[T](buf: var array[10, T], elem: sink T) =
`=sink`(buf[0], elem)
var buf: array[10, int]
enqueue(buf, 42)
assert buf[0] == 42