diff options
author | Arne Döring <arne.doering@gmx.net> | 2019-08-04 19:31:55 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-08-04 19:31:55 +0200 |
commit | b73d097d36d3fb3046fcb0c190c02684cd0c1867 (patch) | |
tree | ced037ba7d59b4dc76849f4aab1cd3a05f21b780 /tests/vm | |
parent | 343ace8194d6bcdeca6b4b4eba9b668a1737b625 (diff) | |
download | Nim-b73d097d36d3fb3046fcb0c190c02684cd0c1867.tar.gz |
fixes #9829 (#11849)
Diffstat (limited to 'tests/vm')
-rw-r--r-- | tests/vm/tmaxloopiterations.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/vm/tmaxloopiterations.nim b/tests/vm/tmaxloopiterations.nim new file mode 100644 index 000000000..6334d1e6d --- /dev/null +++ b/tests/vm/tmaxloopiterations.nim @@ -0,0 +1,15 @@ +discard """ +errormsg: "interpretation requires too many iterations; if you are sure this is not a bug in your code edit compiler/vmdef.MaxLoopIterations and rebuild the compiler" +""" + +# issue #9829 + +macro foo(): untyped = + let lines = ["123", "5423"] + var idx = 0 + while idx < lines.len(): + if lines[idx].len() < 1: + inc(idx) + continue + +foo() |