diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-03-29 15:04:19 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2013-03-29 15:04:19 -0700 |
commit | 7894c1b24fddc91fbec53a9906e3c8b8e8a4e61a (patch) | |
tree | 85dfdc66f525702e414cb7cd3833fe579301cad7 /test | |
parent | 1debc74374e9c3de52d1333b695db61e7a69a57b (diff) | |
parent | 844cef628c809de24d908b9a51760ff33d0db345 (diff) | |
download | scala-7894c1b24fddc91fbec53a9906e3c8b8e8a4e61a.tar.gz scala-7894c1b24fddc91fbec53a9906e3c8b8e8a4e61a.tar.bz2 scala-7894c1b24fddc91fbec53a9906e3c8b8e8a4e61a.zip |
Merge pull request #2305 from retronym/ticket/7296-2
SI-7296 Lifting the limit on case class arity
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t3631.check | 4 | ||||
-rw-r--r-- | test/files/pos/t3631.scala (renamed from test/files/neg/t3631.scala) | 0 | ||||
-rw-r--r-- | test/files/pos/t7296.scala | 6 | ||||
-rw-r--r-- | test/files/run/case-class-23.check | 2 | ||||
-rw-r--r-- | test/files/run/case-class-23.scala | 33 |
5 files changed, 41 insertions, 4 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/pos/t3631.scala index bcf91619ee..bcf91619ee 100644 --- a/test/files/neg/t3631.scala +++ b/test/files/pos/t3631.scala diff --git a/test/files/pos/t7296.scala b/test/files/pos/t7296.scala new file mode 100644 index 0000000000..0c078d3657 --- /dev/null +++ b/test/files/pos/t7296.scala @@ -0,0 +1,6 @@ +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) +} diff --git a/test/files/run/case-class-23.check b/test/files/run/case-class-23.check new file mode 100644 index 0000000000..888ed2c9eb --- /dev/null +++ b/test/files/run/case-class-23.check @@ -0,0 +1,2 @@ +23 +(1,23) diff --git a/test/files/run/case-class-23.scala b/test/files/run/case-class-23.scala new file mode 100644 index 0000000000..92b719574a --- /dev/null +++ b/test/files/run/case-class-23.scala @@ -0,0 +1,33 @@ +case class TwentyThree( + _1: Int, + _2: Int, + _3: Int, + _4: Int, + _5: Int, + _6: Int, + _7: Int, + _8: Int, + _9: Int, + _10: Int, + _11: Int, + _12: Int, + _13: Int, + _14: Int, + _15: Int, + _16: Int, + _17: Int, + _18: Int, + _19: Int, + _20: Int, + _21: Int, + _22: Int, + _23: Int +) + +object Test extends App { + val x = new TwentyThree(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23) + println(x._23) + assert(x.copy(_1 = 1) == x) + val TwentyThree(a, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, b) = x + println((a, b)) +} |