Closed
Description
dotty> object Foo {
class Bar[T]
implicit def const[T](x: T): Bar[T] = ???
def bar[T](e: T): Any = ???
def bar[T](e: Bar[T]): Any = ???
val b: Bar[Int] = ???
bar(b)
}
^
bar(bar)
<console>:13: error: Ambiguous overload. The overloaded alternatives of method bar in object Foo$ with types
[T](e: Foo.Bar[T])Any
[T](e: T)Any
both match arguments (Foo.Bar[Int](Foo.bar))
scala> object Foo {
| class Bar[T]
| implicit def const[T](x: T): Bar[T] = ???
|
| def bar[T](e: T): Any = ???
| def bar[T](e: Bar[T]): Any = ???
|
| val b: Bar[Int] = ???
| bar(b)
| }
defined object Foo