Files
Nim/tests/ic/mnestasgn.nim
2026-08-25 11:59:19 +02:00

12 lines
369 B
Nim

# Helper for tnestasgn.nim: a `sink`-param routine containing a nested proc
# whose ENTIRE body is a single assignment, so the body node is a bare `nkAsgn`
# rather than an `nkStmtList` — the shape that used to be deferred behind a
# childless placeholder of that same kind.
proc consume*(s: sink string) =
var x = ""
proc setIt() =
x = s
setIt()
echo x