Closed
Description
minimized code
trait ActorRefScope
class ActorRef
case class DeathWatchNotification(actor: ActorRef)
object Main {
val ref: ActorRef = ???
ref match {
case r: ActorRefScope => DeathWatchNotification(r)
case _ =>
}
}
Compilation output
[error] -- [E007] Type Mismatch Error: /dotty-example/src/main/scala/Main.scala:7:52
[error] 7 | case r: ActorRefScope => DeathWatchNotification(r)
[error] | ^
[error] | Found: (r : ActorRefScope)
[error] | Required: ActorRef
expectation
Compile successfully as in scala 2
info
dotty version: 0.22.0-RC1