diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-01-19 00:43:15 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-03-25 08:59:18 +0100 |
commit | 844cef628c809de24d908b9a51760ff33d0db345 (patch) | |
tree | 9bbd9db91a7082c98bfacc058b70b0e8ae2c1aa1 /test/files/neg | |
parent | ad79d74deef6e624aa7048543207ec97810f07f5 (diff) | |
download | scala-844cef628c809de24d908b9a51760ff33d0db345.tar.gz scala-844cef628c809de24d908b9a51760ff33d0db345.tar.bz2 scala-844cef628c809de24d908b9a51760ff33d0db345.zip |
SI-7296 Remove arity limit for case classes
When venturing above the pre-ordained limit of twenty
two, `Companion extends FunctionN` and `Companion.unapply`
are sacrificed. But oh-so-many other case class features
work perfectly: equality/hashing/stringification, the apply
method, and even pattern matching (which already bypasses
unapply.)
There was some understandable fear of the piecemeal when
I tabled this idea on scala-internals [1]. But I'd like
to persist as this limit is a needless source of pain for
anyone using case classes to bind to database, XML or JSON
schemata.
[1] https://groups.google.com/forum/#!topic/scala-internals/RRu5bppi16Y
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t3631.check | 4 | ||||
-rw-r--r-- | test/files/neg/t3631.scala | 3 | ||||
-rw-r--r-- | test/files/neg/t7296.check | 4 | ||||
-rw-r--r-- | test/files/neg/t7296.scala | 6 |
4 files changed, 0 insertions, 17 deletions
diff --git a/test/files/neg/t3631.check b/test/files/neg/t3631.check deleted file mode 100644 index 6d8feca1ed..0000000000 --- a/test/files/neg/t3631.check +++ /dev/null @@ -1,4 +0,0 @@ -t3631.scala:3: error: Implementation restriction: case classes cannot have more than 22 parameters. -case class X23(x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int, x21: Int, x22: Int, x23: Int) { } - ^ -one error found diff --git a/test/files/neg/t3631.scala b/test/files/neg/t3631.scala deleted file mode 100644 index bcf91619ee..0000000000 --- a/test/files/neg/t3631.scala +++ /dev/null @@ -1,3 +0,0 @@ -case class X22(x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int, x21: Int, x22: Int) { } - -case class X23(x1: Int, x2: Int, x3: Int, x4: Int, x5: Int, x6: Int, x7: Int, x8: Int, x9: Int, x10: Int, x11: Int, x12: Int, x13: Int, x14: Int, x15: Int, x16: Int, x17: Int, x18: Int, x19: Int, x20: Int, x21: Int, x22: Int, x23: Int) { }
\ No newline at end of file diff --git a/test/files/neg/t7296.check b/test/files/neg/t7296.check deleted file mode 100644 index 66e8353ee3..0000000000 --- a/test/files/neg/t7296.check +++ /dev/null @@ -1,4 +0,0 @@ -t7296.scala:5: error: Implementation restriction: case classes cannot have more than 22 parameters. - case class Foo(a: A, b: A, c: A, d: A, e: A, f: A, g: A, h: A, i: A, j: A, k: A, l: A, m: A, n: A, o: A, p: A, q: A, r: A, s: A, t: A, u: A, v: A, w: A, x: A, y: A, Z: A) - ^ -one error found diff --git a/test/files/neg/t7296.scala b/test/files/neg/t7296.scala deleted file mode 100644 index 0c078d3657..0000000000 --- a/test/files/neg/t7296.scala +++ /dev/null @@ -1,6 +0,0 @@ -object Test { - type A = Int - // Emits the implementation restriction but then proceeds to crash - // when creating the Foo.unapply. - case class Foo(a: A, b: A, c: A, d: A, e: A, f: A, g: A, h: A, i: A, j: A, k: A, l: A, m: A, n: A, o: A, p: A, q: A, r: A, s: A, t: A, u: A, v: A, w: A, x: A, y: A, Z: A) -} |