summary refs log tree commit diff stats
path: root/tests/iter/t22619.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/iter/t22619.nim')
-rw-r--r--tests/iter/t22619.nim8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/iter/t22619.nim b/tests/iter/t22619.nim
index 04e707633..6a98391f3 100644
--- a/tests/iter/t22619.nim
+++ b/tests/iter/t22619.nim
@@ -52,8 +52,12 @@ block:
 
   var numDestroy = 0
 
-  proc `=destroy`(x: Value) =
-    inc numDestroy
+  when defined(gcRefc):
+    proc `=destroy`(x: var Value) =
+      inc numDestroy
+  else:
+    proc `=destroy`(x: Value) =
+      inc numDestroy
 
   iterator iter(s: seq[Value]): int {.closure.} =
     # because it is used across yields, `s2` is lifted into the iterator's