You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a simple code which throws an error on 2.12.x+ but work perfectly fine on dotty.
abstract class Base[T] {
type Type = T
def methodOp(arg: Type): Unit = {
this match {
case m: Base[T] with Mark =>
m.method(arg.asInstanceOf[m.Type]) throw java.lang.AbstractMethodError Apps$.method(Ljava/lang/Object;)V
case _ =>
}
}
}
trait Mark { this: Base[_] =>
def method(arg: Type): Unit
}
object Apps extends Base[Int] with Mark {
override def method(arg: Apps.Type): Unit = {
println(arg)
}
}
Hello,
I have a simple code which throws an error on 2.12.x+ but work perfectly fine on dotty.
https://scastie.scala-lang.org/ndlr1yZiSyiuORdjAvULmw
works with dotty:
https://scastie.scala-lang.org/nG7jh4zpRKWB9P20WuoXZw
Is it possible to work around this error?
The text was updated successfully, but these errors were encountered: