diff options
Diffstat (limited to 'tests/accept/compile/tfib.nim')
-rw-r--r-- | tests/accept/compile/tfib.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/accept/compile/tfib.nim b/tests/accept/compile/tfib.nim new file mode 100644 index 000000000..09a4d5038 --- /dev/null +++ b/tests/accept/compile/tfib.nim @@ -0,0 +1,11 @@ + +iterator fibonacci(): int = + var a = 0 + var b = 1 + while true: + yield a + var c = b + b = a + a = a + c + + |