diff options
author | metagn <metagngn@gmail.com> | 2022-12-06 15:11:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-06 13:11:56 +0100 |
commit | 4ca2dcb404aa1b92900e838790d5df554fc0cb9a (patch) | |
tree | 13ba43b84b90c24f23b528fe110e15338e35fae6 /tests/effects | |
parent | 1564ae650f8d4d4c30adf4528f74d7707e4cb737 (diff) | |
download | Nim-4ca2dcb404aa1b92900e838790d5df554fc0cb9a.tar.gz |
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
Diffstat (limited to 'tests/effects')
-rw-r--r-- | tests/effects/tdiagnostic_messages.nim | 2 | ||||
-rw-r--r-- | tests/effects/teffects1.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/effects/tdiagnostic_messages.nim b/tests/effects/tdiagnostic_messages.nim index 2ce4895a3..b1acf8c5c 100644 --- a/tests/effects/tdiagnostic_messages.nim +++ b/tests/effects/tdiagnostic_messages.nim @@ -12,7 +12,7 @@ tdiagnostic_messages.nim(36, 6) Error: 'a' can have side effects >>> tdiagnostic_messages.nim(32, 33) Hint: 'callWithSideEffects' calls `.sideEffect` 'indirectCallViaPointer' >>>> tdiagnostic_messages.nim(27, 6) Hint: 'indirectCallViaPointer' called by 'callWithSideEffects' >>>>> tdiagnostic_messages.nim(28, 32) Hint: 'indirectCallViaPointer' calls routine via pointer indirection ->>> tdiagnostic_messages.nim(33, 10) Hint: 'callWithSideEffects' calls `.sideEffect` 'myEcho' +>>> tdiagnostic_messages.nim(33, 3) Hint: 'callWithSideEffects' calls `.sideEffect` 'myEcho' >>>> tdiagnostic_messages.nim(24, 6) Hint: 'myEcho' called by 'callWithSideEffects' >>> tdiagnostic_messages.nim(34, 3) Hint: 'callWithSideEffects' accesses global state 'globalVar' >>>> tdiagnostic_messages.nim(23, 5) Hint: 'globalVar' accessed by 'callWithSideEffects' diff --git a/tests/effects/teffects1.nim b/tests/effects/teffects1.nim index 68bafa94d..caa8907c3 100644 --- a/tests/effects/teffects1.nim +++ b/tests/effects/teffects1.nim @@ -17,7 +17,7 @@ proc forw: int {. .} proc lier(): int {.raises: [IO2Error].} = #[tt.Hint ^ 'lier' cannot raise 'IO2Error' [XCannotRaiseY] ]# writeLine stdout, "arg" #[tt.Error - ^ writeLine stdout, ["arg"] can raise an unlisted exception: ref IOError ]# + ^ writeLine stdout, ["arg"] can raise an unlisted exception: ref IOError ]# proc forw: int = raise newException(IOError, "arg") |