summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tests/arc/bmodule.nim4
-rw-r--r--tests/arc/cmodule.nim4
-rw-r--r--tests/arc/t14864.nim5
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/arc/bmodule.nim b/tests/arc/bmodule.nim
new file mode 100644
index 000000000..70c2cc645
--- /dev/null
+++ b/tests/arc/bmodule.nim
@@ -0,0 +1,4 @@
+import cmodule
+
+for i in @[1, 2, 3].cycle():
+  echo i
diff --git a/tests/arc/cmodule.nim b/tests/arc/cmodule.nim
new file mode 100644
index 000000000..6c6e6c0fa
--- /dev/null
+++ b/tests/arc/cmodule.nim
@@ -0,0 +1,4 @@
+iterator cycle*[T](s: openArray[T]): T =
+  let s = @s
+  for x in s:
+    yield x
diff --git a/tests/arc/t14864.nim b/tests/arc/t14864.nim
new file mode 100644
index 000000000..f59b14d2c
--- /dev/null
+++ b/tests/arc/t14864.nim
@@ -0,0 +1,5 @@
+discard """
+  cmd: "nim c --gc:arc $file"
+"""
+
+import bmodule