diff options
Diffstat (limited to 'tests/lookups/tambiguousemit.nim')
-rw-r--r-- | tests/lookups/tambiguousemit.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/lookups/tambiguousemit.nim b/tests/lookups/tambiguousemit.nim new file mode 100644 index 000000000..0ebd0a255 --- /dev/null +++ b/tests/lookups/tambiguousemit.nim @@ -0,0 +1,12 @@ +discard """ + cmd: "nim check $options $file" # use check to assure error is pre-codegen + matrix: "; --backend:js" # backend shouldn't matter but at least check js +""" + +proc foo(x: int) = discard +proc foo(x: float) = discard + +{.emit: ["// ", foo].} #[tt.Error + ^ ambiguous identifier 'foo' -- use one of the following: + tambiguousemit.foo: proc (x: int){.noSideEffect, gcsafe.} + tambiguousemit.foo: proc (x: float){.noSideEffect, gcsafe.}]# |