treciter.nim 293 B

123456789101112131415
  1. discard """
  2. file: "treciter.nim"
  3. line: 9
  4. errormsg: "recursive dependency: \'myrec\'"
  5. """
  6. # Test that an error message occurs for a recursive iterator
  7. iterator myrec(n: int): int =
  8. for x in myrec(n-1): #ERROR_MSG recursive dependency: 'myrec'
  9. yield x
  10. for x in myrec(10): echo x