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

closes #24992
This commit is contained in:
ringabout
2025-06-12 21:47:41 +08:00
committed by GitHub
parent 56bb451c6d
commit 151b903172

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