summary refs log tree commit diff stats
path: root/tests/vm/tmaxloopiterations.nim
blob: 6334d1e6dffd7aa2a775e09f944115871afd14a2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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()