Files
Nim/tests/errmsgs/t9768.nim
Miran 2b5e48d807 move assertions and iterators out of system.nim (#10597)
* move assertions and iterators out of system.nim
* limit nimsuggest tests to the first 3 suggestions
2019-03-07 00:49:39 +01:00

31 lines
347 B
Nim

discard """
errmsg: "unhandled exception:"
file: "system/fatal.nim"
nimout: '''
stack trace: (most recent call last)
t9768.nim(28, 33) main
t9768.nim(23, 11) foo1
'''
"""
## line 20
proc foo1(a: int): auto =
doAssert a < 4
result = a * 2
proc main()=
static:
if foo1(1) > 0: discard foo1(foo1(2))
main()