bugfix: inline iterator do not mess up line information anymore

This commit is contained in:
Andreas Rumpf 2017-01-25 09:34:45 +01:00
commit 1fa3a9dac2
2 changed files with 29 additions and 3 deletions

View file

@ -0,0 +1,22 @@
discard """
outputsub: '''tproper_stacktrace2.nim(20) main'''
exitcode: 1
"""
proc returnsNil(): string = return nil
iterator fields*(a, b: int): int =
if a == b:
for f in a..b:
yield f
else:
for f in a..b:
yield f
proc main(): string =
result = ""
for i in fields(0, 1):
let x = returnsNil()
result &= "string literal " & $x
echo main()