diff options
Diffstat (limited to 'tests/treciter.nim')
-rwxr-xr-x | tests/treciter.nim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/treciter.nim b/tests/treciter.nim new file mode 100755 index 000000000..662239285 --- /dev/null +++ b/tests/treciter.nim @@ -0,0 +1,7 @@ +# Test that an error message occurs for a recursive iterator + +iterator myrec(n: int): int = + for x in myrec(n-1): #ERROR_MSG recursive dependency: 'myrec' + yield x + +for x in myrec(10): echo x |