Files
Nim/tests/vm/tmaxloopiterations.nim
Arne Döring 38893a34ee fixes #9829 (#11849)
(cherry picked from commit b73d097d36)
2019-08-13 16:59:49 +02:00

16 lines
360 B
Nim

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