Nim/tests/errmsgs/t9768.nim
metagn 4ca2dcb404
Named arguments in commands + many grammar fixes (#20994)
* Breaking parser changes, implement https://github.com/nim-lang/RFCs/issues/442

Types are separated from expressions and better reflected in the grammar.

* add test

* more accurate grammar

* fix keyword typedescs

* accept expressions in proc argument lists

* CI "fixes"

* fixes

* allow full ref expressions again, adapt old tests

* cleanup, fix some tests

* improve grammar, try and revert semtypes change

* restrict sigil binding to identOrLiteral

* fix, should have caught this immediately

* add changelog entry, fix double not nil bug

* correct grammar

* change section

* fix

* real fix hopefully

* fix test

* support LL(1) for tuples

* make grammar.txt too
2022-12-06 13:11:56 +01:00

31 lines
396 B
Nim

discard """
errormsg: "unhandled exception: t9768.nim(24, 3) `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()