diff options
Diffstat (limited to 'test/files/pos/t5399a.scala')
-rw-r--r-- | test/files/pos/t5399a.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/pos/t5399a.scala b/test/files/pos/t5399a.scala new file mode 100644 index 0000000000..4ebd85ad03 --- /dev/null +++ b/test/files/pos/t5399a.scala @@ -0,0 +1,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) => () + } + } +} |