diff options
author | metagn <metagngn@gmail.com> | 2022-12-01 10:01:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-01 08:01:13 +0100 |
commit | 2449c37137c001e5c645978a6bf09c4b1d87dea7 (patch) | |
tree | 4e74a41e7daea447ab4dd897a67eaf02367098d2 /tests/ambsym | |
parent | b36f5119ae3e4f450960a86ff77eaae4e9b05fcd (diff) | |
download | Nim-2449c37137c001e5c645978a6bf09c4b1d87dea7.tar.gz |
better procvar ambiguity errors, clean up after #20457 (#20932)
* better procvar ambiguity errors, clean up after #20457 fixes #6359, fixes #13849 * only trigger on closedsymchoice again * new approach * add manual entry for ambiguous enums too * add indent [skip ci] * move to proc
Diffstat (limited to 'tests/ambsym')
-rw-r--r-- | tests/ambsym/tambprocvar.nim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ambsym/tambprocvar.nim b/tests/ambsym/tambprocvar.nim new file mode 100644 index 000000000..2a9921bad --- /dev/null +++ b/tests/ambsym/tambprocvar.nim @@ -0,0 +1,19 @@ +discard """ + action: reject + cmd: "nim check $file" + nimout: ''' +tambprocvar.nim(15, 11) Error: ambiguous identifier 'foo' -- use one of the following: + tambprocvar.foo: proc (x: int){.noSideEffect, gcsafe.} + tambprocvar.foo: proc (x: float){.noSideEffect, gcsafe.} +''' +""" + +block: + proc foo(x: int) = discard + proc foo(x: float) = discard + + let x = foo + +block: + let x = `+` #[tt.Error + ^ ambiguous identifier '+' -- use one of the following:]# |