mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 02:42:05 +00:00
* fixes #21195; `std/assertions` continue to use `sysFatal` * try includes * make `std/assertions` self-contained * fixes tests * fixes tests
32 lines
452 B
Nim
32 lines
452 B
Nim
discard """
|
|
errormsg: "unhandled exception: t9768.nim(24, 3) `a < 4` [AssertionDefect]"
|
|
file: "std/assertions.nim"
|
|
matrix: "-d:nimPreviewSlimSystem"
|
|
nimout: '''
|
|
stack trace: (most recent call last)
|
|
t9768.nim(29, 33) main
|
|
t9768.nim(24, 11) foo1
|
|
'''
|
|
"""
|
|
import std/assertions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 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()
|