diff options
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() |