diff options
author | Clyybber <darkmine956@gmail.com> | 2020-07-07 22:43:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-07 22:43:36 +0200 |
commit | 8480bef1c4f289228808a9b7525f6052c0ca7152 (patch) | |
tree | 7387e84e42825f7e12d9b2c4a924f94e58d2eca5 /tests | |
parent | 25ceacbe4f548588f13e9420c0b7165da40282c6 (diff) | |
download | Nim-8480bef1c4f289228808a9b7525f6052c0ca7152.tar.gz |
Add testcase for #14864 (#14928)
* Add testcase for #14864 * :D
Diffstat (limited to 'tests')
-rw-r--r-- | tests/arc/bmodule.nim | 4 | ||||
-rw-r--r-- | tests/arc/cmodule.nim | 4 | ||||
-rw-r--r-- | tests/arc/t14864.nim | 5 |
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 |