Skip to content
Permalink
Browse files

Test case closes SI-5407

It still breaks as described in the ticket under -Xoldpatmat.
  • Loading branch information
retronym committed May 12, 2012
1 parent 3511e59 commit f707141863799c801df6bdd3bbbc28a01c15bbbd
Showing with 19 additions and 0 deletions.
  1. +2 −0 test/files/run/t5407.check
  2. +17 −0 test/files/run/t5407.scala
@@ -0,0 +1,2 @@
2
2
@@ -0,0 +1,17 @@
case class Foo(private val x: Int, y: Option[Int], z: Boolean)

object Test extends App {
def foo(x: Foo) = x match {
case Foo(x, Some(y), z) => y
case Foo(x, y, z) => 0
}
val x = Foo(1, Some(2), false)
println(foo(x))


def bar(x: Foo) = x match {
case Foo(x, Some(y), z) => y
case Foo(x, None, z) => 0
}
println(bar(x))
}

0 comments on commit f707141

Please sign in to comment.
You can’t perform that action at this time.