summary refs log tree commit diff stats
path: root/tests/gc/stackrefleak.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gc/stackrefleak.nim')
-rw-r--r--tests/gc/stackrefleak.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/gc/stackrefleak.nim b/tests/gc/stackrefleak.nim
index 302ef3599..7f3fbff43 100644
--- a/tests/gc/stackrefleak.nim
+++ b/tests/gc/stackrefleak.nim
@@ -12,7 +12,8 @@ type
 proc makePair: PCyclic =
   new(result)
   new(result.sibling)
-  result.sibling.sibling = result
+  when not defined(gcDestructors):
+    result.sibling.sibling = result
 
 proc loop =
   for i in 0..10000: