diff options
author | Paul Phillips <paulp@improving.org> | 2011-04-24 19:15:46 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-04-24 19:15:46 +0000 |
commit | 870679585afc3fe8dc07b40fe032919ede414489 (patch) | |
tree | cb0ba90f1f203c519d9fe739d7e3c3d22d22240f /test/files/run | |
parent | add75447f46bcfb608f32c15fb9a5eb69f45a10d (diff) | |
download | scala-870679585afc3fe8dc07b40fe032919ede414489.tar.gz scala-870679585afc3fe8dc07b40fe032919ede414489.tar.bz2 scala-870679585afc3fe8dc07b40fe032919ede414489.zip |
Removed restriction on case classes having only...
Removed restriction on case classes having only two parameter lists.
Closes #1333, no review.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/bug1333.check | 3 | ||||
-rw-r--r-- | test/files/run/bug1333.scala | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/test/files/run/bug1333.check b/test/files/run/bug1333.check new file mode 100644 index 0000000000..6303af7f1c --- /dev/null +++ b/test/files/run/bug1333.check @@ -0,0 +1,3 @@ +10 +-10 +-1 diff --git a/test/files/run/bug1333.scala b/test/files/run/bug1333.scala new file mode 100644 index 0000000000..1696629cbb --- /dev/null +++ b/test/files/run/bug1333.scala @@ -0,0 +1,14 @@ +object Test { + case class A(x: Int)(y: Int)(z: String) + + def f(x: Any) = x match { + case A(x) => x + case _ => -1 + } + + def main(args: Array[String]): Unit = { + println(f(A(10)(20)("abc"))) + println(f(A(-10)(20)("abc"))) + println(f(List(1))) + } +} |