We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56bb451 commit 151b903Copy full SHA for 151b903
tests/arc/t23247.nim
@@ -49,4 +49,17 @@ proc setGauge(
49
var nim_gc_mem_bytes = Gauge()
50
let threadID = $getThreadId()
51
setGauge(nim_gc_mem_bytes, @[threadID])
52
-setGauge(nim_gc_mem_bytes, @[threadID])
+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