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 | |
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')
-rw-r--r-- | test/files/neg/bug1333.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug1333.scala | 1 | ||||
-rw-r--r-- | test/files/run/bug1333.check | 3 | ||||
-rw-r--r-- | test/files/run/bug1333.scala | 14 |
4 files changed, 17 insertions, 5 deletions
diff --git a/test/files/neg/bug1333.check b/test/files/neg/bug1333.check deleted file mode 100644 index 11ba633194..0000000000 --- a/test/files/neg/bug1333.check +++ /dev/null @@ -1,4 +0,0 @@ -bug1333.scala:1: error: case classes limited by implementation: maximum of 2 constructor parameter lists. -case class A(a: Int)(b: Int)(c: Int) - ^ -one error found diff --git a/test/files/neg/bug1333.scala b/test/files/neg/bug1333.scala deleted file mode 100644 index e16b38cefc..0000000000 --- a/test/files/neg/bug1333.scala +++ /dev/null @@ -1 +0,0 @@ -case class A(a: Int)(b: Int)(c: Int) 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))) + } +} |