summaryrefslogtreecommitdiff
path: root/test/files/pos/t5399a.scala
blob: 4ebd85ad03a88102ad69b2087bd474f6172c45b2 (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[_]) {
    s.key match {
      case ScopedKey1(scalaHome.key | scalaVersion.key) => ()
    }
  }
}