aboutsummaryrefslogblamecommitdiff
path: root/tests/patmat/t9779.scala
blob: 9c418b0b1dc5c1ae3869887d5e36fad4b287bf4e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                            
trait Elems {
  sealed class Elem[A] extends Dummy

  val UnitElement: Elem[Unit]

  trait Dummy
}

class BadMatch[A <: Elems](a: A) {
  private def toLuaValue(eX: a.Elem[_]): String = eX match {
    case a.UnitElement => "" // type mismatch
  }
}