-
Notifications
You must be signed in to change notification settings - Fork 21
Open
scala/scala
#11198Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)
Milestone
Description
Reproduction steps
Scala version: 2.13.18
package p {
object X extends App {
B.f(0) // ok
q.f(0) // nope
}
trait A {
def f(x: String): String
}
package q {
object `package` extends A {
def f(x: Int): String = ???
def f(x: String): String = ???
}
}
object B extends A {
def f(x: Int): String = ???
def f(x: String): String = ???
}
}Problem
scala-cli compile --server=false -S 2.13.18 test/files/pos/po-overload.scala
/home/amarki/projects/scala/test/files/pos/po-overload.scala:4: error: type mismatch;
found : Int(0)
required: String
q.f(0) // nope
^
1 error
Compilation failed
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)