Closed
Description
Found this issue while executing code on dotty compiled standard library, specifically on calling the method value
on a BooleanPropImpl
. The following code is a minimized version of the issue:
object Test {
def main(args: Array[String]): Unit = {
(new BooleanPropImpl2: BooleanProp2).value
}
}
class BooleanPropImpl2 extends PropImpl2[Boolean](true) with BooleanProp2
trait BooleanProp2 {
def value: Boolean
}
class PropImpl2[T](x: T) {
def value: T = x
}
failing with
java.lang.AbstractMethodError: Method BooleanPropImpl2.value()Z is abstract
at BooleanPropImpl2.value(main.scala)
at Test$.main(main.scala:8)
In the bytecode it is clear that class PropImpl2
implements public Object value()
and class BooleanProp2
defines boolean value();
, but there is no implementation of boolean value()
in BooleanPropImpl2
.