aboutsummaryrefslogblamecommitdiff
path: root/tests/untried/pos/t5399a.scala
blob: c40cef4f961b56e4f4339ef21daa0193b0a99589 (plain) (tree)


















                                                                 
class Foo {
  trait Init[T]
  class ScopedKey[T] extends Init[T]

  trait Setting[T] {
    val key: ScopedKey[T]
  }

  case class ScopedKey1[T](val foo: Init[T]) extends ScopedKey[T]

  val scalaHome: Setting[Option[String]] = null
  val scalaVersion: Setting[String] = null

  def testPatternMatch(s: Setting[_]): Unit = {
    s.key match {
      case ScopedKey1(scalaHome.key | scalaVersion.key) => ()
    }
  }
}