Closed
Description
This was initially reported on the dotty gitter channel by @Jasper-M but I did not find an open issue for that.
The behaviour is the same with -language:Scala2
Scala
scala> class Foo { def A(i: Double) = i; object A{ def apply(i: Int) = i+1 }; def foo = A(0) }
defined class Foo
scala> new Foo().foo
res6: Int = 1
Dotty
scala> class Foo { def A(i: Double) = i; object A{ def apply(i: Int) = i+1 }; def foo = A(0) }
// defined class Foo
scala> new Foo().foo
val res0: Double = 0.0