Skip to content

Commit 151b903

Browse files
authored
closes #24992; adds a test case (#24993)
closes #24992
1 parent 56bb451 commit 151b903

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tests/arc/t23247.nim

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,17 @@ proc setGauge(
4949
var nim_gc_mem_bytes = Gauge()
5050
let threadID = $getThreadId()
5151
setGauge(nim_gc_mem_bytes, @[threadID])
52-
setGauge(nim_gc_mem_bytes, @[threadID])
52+
setGauge(nim_gc_mem_bytes, @[threadID])
53+
54+
55+
type
56+
Callback*[C] = proc(value: sink C): uint
57+
Person = object
58+
59+
proc invoke[C](target: Callback[C], values: sink C): uint =
60+
return target(values)
61+
62+
proc operation(value: sink (Person, string, int)): uint =
63+
return 123
64+
65+
doAssert invoke(operation, (Person(), "Jack", 25)) == 123

0 commit comments

Comments
 (0)