diff options
author | Paul Phillips <paulp@improving.org> | 2011-11-16 00:34:37 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-11-16 00:34:37 +0000 |
commit | b7395e9f503b25c1dec1abf041cd7869126ebf64 (patch) | |
tree | 1821378fb509ac988a634d3c92193cbb2318f8ce /test/disabled | |
parent | 0a31808f5f190791c1edf4e8c7c34bb72e715946 (diff) | |
download | scala-b7395e9f503b25c1dec1abf041cd7869126ebf64.tar.gz scala-b7395e9f503b25c1dec1abf041cd7869126ebf64.tar.bz2 scala-b7395e9f503b25c1dec1abf041cd7869126ebf64.zip |
Reverted ProductN parent for case classes.
Looks like we will need blood, toil, tears, and sweat. No review.
Diffstat (limited to 'test/disabled')
-rw-r--r-- | test/disabled/pos/caseclass-parents.flags | 1 | ||||
-rw-r--r-- | test/disabled/pos/caseclass-parents.scala | 11 | ||||
-rw-r--r-- | test/disabled/pos/caseclass-productN.flags | 1 | ||||
-rw-r--r-- | test/disabled/pos/caseclass-productN.scala | 20 |
4 files changed, 33 insertions, 0 deletions
diff --git a/test/disabled/pos/caseclass-parents.flags b/test/disabled/pos/caseclass-parents.flags new file mode 100644 index 0000000000..e1b37447c9 --- /dev/null +++ b/test/disabled/pos/caseclass-parents.flags @@ -0,0 +1 @@ +-Xexperimental
\ No newline at end of file diff --git a/test/disabled/pos/caseclass-parents.scala b/test/disabled/pos/caseclass-parents.scala new file mode 100644 index 0000000000..d4bc52154b --- /dev/null +++ b/test/disabled/pos/caseclass-parents.scala @@ -0,0 +1,11 @@ +case class Foo() extends Serializable +case object Bar extends Serializable + +case class Bippy[T, U](x: T, y: U) extends Product2[T, U] { } + +case class Bounded[T <: util.Random, U <: util.Random](x: T, y: U) { } + +class A { + def f(x: Bounded[_, _]) = x.productIterator foreach g + def g(rand: util.Random) = () +}
\ No newline at end of file diff --git a/test/disabled/pos/caseclass-productN.flags b/test/disabled/pos/caseclass-productN.flags new file mode 100644 index 0000000000..e1b37447c9 --- /dev/null +++ b/test/disabled/pos/caseclass-productN.flags @@ -0,0 +1 @@ +-Xexperimental
\ No newline at end of file diff --git a/test/disabled/pos/caseclass-productN.scala b/test/disabled/pos/caseclass-productN.scala new file mode 100644 index 0000000000..e2177856fd --- /dev/null +++ b/test/disabled/pos/caseclass-productN.scala @@ -0,0 +1,20 @@ +object Test { + class A + class B extends A + class C extends B + + case class Bippy[T](x: Int, y: List[T], z: T) { } + case class Bippy2[T](x: Int, y: List[T], z: T) { } + + def bippies = List( + Bippy(5, List(new C), new B), + Bippy2(5, List(new B), new C) + ) + + def bmethod(x: B) = () + + def main(args: Array[String]): Unit = { + bippies flatMap (_._2) foreach bmethod + bippies map (_._3) foreach bmethod + } +} |