* 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
19 lines
463 B
Nim
19 lines
463 B
Nim
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:]#
|