summary refs log tree commit diff stats
path: root/tests/errmsgs/t9768.nim
blob: 94def90f0726bf7f5a8ef057bbb0f96c877be680 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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()