closes #24992; adds a test case (#24993)

closes #24992

(cherry picked from commit 151b903172)
This commit is contained in:
ringabout
2025-06-12 21:47:41 +08:00
committed by narimiran
parent 1c89ae6684
commit 58d4945c1c

View File

@@ -49,4 +49,17 @@ proc setGauge(
var nim_gc_mem_bytes = Gauge()
let threadID = $getThreadId()
setGauge(nim_gc_mem_bytes, @[threadID])
setGauge(nim_gc_mem_bytes, @[threadID])
setGauge(nim_gc_mem_bytes, @[threadID])
type
Callback*[C] = proc(value: sink C): uint
Person = object
proc invoke[C](target: Callback[C], values: sink C): uint =
return target(values)
proc operation(value: sink (Person, string, int)): uint =
return 123
doAssert invoke(operation, (Person(), "Jack", 25)) == 123