summary refs log tree commit diff stats
path: root/tests/errmsgs/t18886.nim
blob: 8ed160c6459d24a1b308a7c8568e49296c7f3b94 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
discard """
  cmd: "nim check --hints:off $file"
  errormsg: ""
  nimout: '''
t18886.nim(18, 24) Error: ambiguous identifier: 'bar' -- you need a helper proc to disambiguate the following:
  t18886.bar: proc (i: ptr int){.noSideEffect, gcsafe.}
  t18886.bar: proc (i: ptr char){.noSideEffect, gcsafe.}
'''
"""

type Foo = (proc(_: pointer): void)


proc bar(i: ptr[int]) = discard
proc bar(i: ptr[char]) = discard


let fooBar = cast[Foo](bar)