Closed
Description
Following code compiles in scalac, but in dotty it generates following error message:
error: Pattern type Patmat.this.module.O.LetR is neither a subtype nor a supertype of selector type Patmat.this.module.Tree
case module.O.LetR() =>
trait Module {
sealed abstract class Tree
case class LetL() extends Tree
object O {
case class LetR() extends Tree
}
}
class Patmat(val module: Module) {
def patmat(tree: module.Tree) = tree match {
case module.LetL() =>
case module.O.LetR() =>
}
}