Files
Nim/tests/errmsgs/t9768.nim
ringabout 12a20b9fb6 revert #20719; relieve std/assertions of the sysFatal dep (#20743)
* Revert "make `system/fatal` importable (#20718)"

This reverts commit d735c447d3.

* relieve `std/assertions` of the sysFatal dep
2022-11-04 09:53:19 +01:00

32 lines
397 B
Nim

discard """
errormsg: "unhandled exception: t9768.nim(24, 12) `a < 4` [AssertionDefect]"
file: "std/assertions.nim"
nimout: '''
stack trace: (most recent call last)
t9768.nim(29, 33) main
t9768.nim(24, 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()