aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/t5399a.scala
blob: c40cef4f961b56e4f4339ef21daa0193b0a99589 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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) => ()
    }
  }
}