summary refs log tree commit diff stats
path: root/tests/overload/tor_isnt_better.nim
blob: 5ef8bc7c4cc37880e57366f734fb58ae94f8cb35 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
discard """
  errormsg: "ambiguous call;"
  line: 16
"""

# bug #8568

type
  D[T] = object
  E[T] = object

proc g(a: D|E): string = "foo D|E"
proc g(a: D): string = "foo D"

proc test() =
  let x = g D[int]()

test()