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/files | |
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/files')
-rw-r--r-- | test/files/pos/caseclass-parents.flags | 1 | ||||
-rw-r--r-- | test/files/pos/caseclass-parents.scala | 11 | ||||
-rw-r--r-- | test/files/pos/caseclass-productN.flags | 1 | ||||
-rw-r--r-- | test/files/pos/caseclass-productN.scala | 20 | ||||
-rw-r--r-- | test/files/presentation/properties.check | 6 | ||||
-rw-r--r-- | test/files/run/inline-ex-handlers.check | 141 | ||||
-rw-r--r-- | test/files/scalap/caseClass/result.test | 4 |
7 files changed, 81 insertions, 103 deletions
diff --git a/test/files/pos/caseclass-parents.flags b/test/files/pos/caseclass-parents.flags deleted file mode 100644 index e1b37447c9..0000000000 --- a/test/files/pos/caseclass-parents.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental
\ No newline at end of file diff --git a/test/files/pos/caseclass-parents.scala b/test/files/pos/caseclass-parents.scala deleted file mode 100644 index d4bc52154b..0000000000 --- a/test/files/pos/caseclass-parents.scala +++ /dev/null @@ -1,11 +0,0 @@ -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/files/pos/caseclass-productN.flags b/test/files/pos/caseclass-productN.flags deleted file mode 100644 index e1b37447c9..0000000000 --- a/test/files/pos/caseclass-productN.flags +++ /dev/null @@ -1 +0,0 @@ --Xexperimental
\ No newline at end of file diff --git a/test/files/pos/caseclass-productN.scala b/test/files/pos/caseclass-productN.scala deleted file mode 100644 index e2177856fd..0000000000 --- a/test/files/pos/caseclass-productN.scala +++ /dev/null @@ -1,20 +0,0 @@ -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 - } -} diff --git a/test/files/presentation/properties.check b/test/files/presentation/properties.check index cf18cafdbe..a721d49e3a 100644 --- a/test/files/presentation/properties.check +++ b/test/files/presentation/properties.check @@ -3,7 +3,7 @@ reload: properties.scala askTypeCompletion at properties.scala(29,33) ================================================================================ [response] aksTypeCompletion at (29,33) -retrieved 51 members +retrieved 50 members `method !=(x$1: Any)Boolean` `method !=(x$1: AnyRef)Boolean` `method ##()Int` @@ -11,7 +11,6 @@ retrieved 51 members `method ->[B](y: B)(properties.Property[String], B)` `method ==(x$1: Any)Boolean` `method ==(x$1: AnyRef)Boolean` -`method _1=> String` `method apply()String` `method asInstanceOf[T0]=> T0` `method canEqual(that: Any)Boolean` @@ -55,7 +54,7 @@ retrieved 51 members askTypeCompletion at properties.scala(29,67) ================================================================================ [response] aksTypeCompletion at (29,67) -retrieved 51 members +retrieved 50 members `method !=(x$1: Any)Boolean` `method !=(x$1: AnyRef)Boolean` `method ##()Int` @@ -63,7 +62,6 @@ retrieved 51 members `method ->[B](y: B)(properties.Property[String], B)` `method ==(x$1: Any)Boolean` `method ==(x$1: AnyRef)Boolean` -`method _1=> String` `method apply()String` `method asInstanceOf[T0]=> T0` `method canEqual(that: Any)Boolean` diff --git a/test/files/run/inline-ex-handlers.check b/test/files/run/inline-ex-handlers.check index 0c65d8d6b3..7a8a744bfa 100644 --- a/test/files/run/inline-ex-handlers.check +++ b/test/files/run/inline-ex-handlers.check @@ -1,36 +1,49 @@ -422c422 +172c172 +< locals: value x$1, value temp1 +--- +> locals: value x$1, value temp1, variable boxed1 +174c174 +< blocks: [1,2,3,4] +--- +> blocks: [1,2,3] +187,189d186 +< 92 JUMP 4 +< +< 4: +195a193,194 +> 92 STORE_LOCAL(variable boxed1) +> 92 LOAD_LOCAL(variable boxed1) +386c385 < blocks: [1,2,3,4,5,7,8,10] --- > blocks: [1,2,3,4,5,7,8,10,11] -446c446,447 +410c409,418 < 103 THROW(MyException) --- > ? STORE_LOCAL(value ex$1) > ? JUMP 11 -447a449,456 +> > 11: > 101 LOAD_LOCAL(value ex$1) -> 101 STORE_LOCAL(value temp1) -> 101 SCOPE_ENTER value temp1 -> 101 LOAD_LOCAL(value temp1) +> 101 STORE_LOCAL(value temp2) +> 101 SCOPE_ENTER value temp2 +> 101 LOAD_LOCAL(value temp2) > 101 IS_INSTANCE REF(class MyException) > 101 CZJUMP (BOOL)NE ? 4 : 5 -> -537c546 +501c509 < blocks: [1,2,3,4,6,7,8,9,10] --- > blocks: [1,2,3,4,6,7,8,9,10,11,12,13] -566c575 +530c538,543 < 306 THROW(MyException) --- > ? JUMP 11 -567a577,581 +> > 11: > ? LOAD_LOCAL(variable monitor4) > 305 MONITOR_EXIT > ? JUMP 12 -> -572c586,592 +536c549,555 < ? THROW(Throwable) --- > ? JUMP 12 @@ -40,7 +53,7 @@ > 304 MONITOR_EXIT > ? STORE_LOCAL(value t) > ? JUMP 13 -578c598,611 +542c561,574 < ? THROW(Throwable) --- > ? STORE_LOCAL(value t) @@ -57,19 +70,19 @@ > 310 CALL_PRIMITIVE(EndConcat) > 310 CALL_METHOD scala.Predef.println (dynamic) > 310 JUMP 2 -602c635 +566c598 < catch (Throwable) in ArrayBuffer(7, 8, 9, 10) starting at: 6 --- > catch (Throwable) in ArrayBuffer(7, 8, 9, 10, 11) starting at: 6 -605c638 +569c601 < catch (Throwable) in ArrayBuffer(4, 6, 7, 8, 9, 10) starting at: 3 --- > catch (Throwable) in ArrayBuffer(4, 6, 7, 8, 9, 10, 11, 12) starting at: 3 -637c670 +601c633 < blocks: [1,2,3,4,5,6,7,9,10] --- > blocks: [1,2,3,4,5,6,7,9,10,11,12] -661c694,700 +625c657,663 < 78 THROW(IllegalArgumentException) --- > ? STORE_LOCAL(value e) @@ -79,7 +92,7 @@ > 81 LOAD_LOCAL(value e) > ? STORE_LOCAL(variable exc1) > ? JUMP 12 -690c729,743 +654c692,706 < 81 THROW(Exception) --- > ? STORE_LOCAL(variable exc1) @@ -97,34 +110,33 @@ > 84 STORE_LOCAL(variable result) > 84 LOAD_LOCAL(variable exc1) > 84 THROW(Throwable) -712c765 +676c728 < catch (<none>) in ArrayBuffer(4, 6, 7, 9) starting at: 3 --- > catch (<none>) in ArrayBuffer(4, 6, 7, 9, 11) starting at: 3 -738c791 +702c754 < blocks: [1,2,3,4,5,6,7,8,11,12,13,14,15,16,18,19] --- > blocks: [1,2,3,4,5,6,7,8,11,12,13,14,15,16,18,19,20,21,22] -762c815,816 +726c778,787 < 172 THROW(MyException) --- > ? STORE_LOCAL(value ex$4) > ? JUMP 20 -763a818,825 +> > 20: > 170 LOAD_LOCAL(value ex$4) -> 170 STORE_LOCAL(value temp10) -> 170 SCOPE_ENTER value temp10 -> 170 LOAD_LOCAL(value temp10) +> 170 STORE_LOCAL(value temp11) +> 170 SCOPE_ENTER value temp11 +> 170 LOAD_LOCAL(value temp11) > 170 IS_INSTANCE REF(class MyException) > 170 CZJUMP (BOOL)NE ? 12 : 13 -> -816c878,879 +780c841,842 < 177 THROW(MyException) --- > ? STORE_LOCAL(value ex$5) > ? JUMP 21 -820c883,892 +784c846,855 < 170 THROW(Throwable) --- > ? STORE_LOCAL(value ex$5) @@ -132,22 +144,22 @@ > > 21: > 169 LOAD_LOCAL(value ex$5) -> 169 STORE_LOCAL(value temp13) -> 169 SCOPE_ENTER value temp13 -> 169 LOAD_LOCAL(value temp13) +> 169 STORE_LOCAL(value temp14) +> 169 SCOPE_ENTER value temp14 +> 169 LOAD_LOCAL(value temp14) > 169 IS_INSTANCE REF(class MyException) > 169 CZJUMP (BOOL)NE ? 5 : 6 -851c923,924 +815c886,887 < 182 THROW(MyException) --- > ? STORE_LOCAL(variable exc2) > ? JUMP 22 -855c928,929 +819c891,905 < 169 THROW(Throwable) --- > ? STORE_LOCAL(variable exc2) > ? JUMP 22 -856a931,943 +> > 22: > 184 LOAD_MODULE object Predef > 184 CONSTANT("finally") @@ -160,20 +172,19 @@ > 185 STORE_LOCAL(variable result) > 185 LOAD_LOCAL(variable exc2) > 185 THROW(Throwable) -> -877c964 +841c927 < catch (Throwable) in ArrayBuffer(11, 12, 13, 14, 15, 16, 18) starting at: 4 --- > catch (Throwable) in ArrayBuffer(11, 12, 13, 14, 15, 16, 18, 20) starting at: 4 -880c967 +844c930 < catch (<none>) in ArrayBuffer(4, 5, 6, 7, 11, 12, 13, 14, 15, 16, 18) starting at: 3 --- > catch (<none>) in ArrayBuffer(4, 5, 6, 7, 11, 12, 13, 14, 15, 16, 18, 20, 21) starting at: 3 -906c993 +870c956 < blocks: [1,2,3,6,7,8,10,11,13] --- > blocks: [1,2,3,6,7,8,10,11,13,14] -930c1017,1026 +894c980,989 < 124 THROW(MyException) --- > ? STORE_LOCAL(value ex$2) @@ -181,20 +192,20 @@ > > 14: > 122 LOAD_LOCAL(value ex$2) -> 122 STORE_LOCAL(value temp4) -> 122 SCOPE_ENTER value temp4 -> 122 LOAD_LOCAL(value temp4) +> 122 STORE_LOCAL(value temp5) +> 122 SCOPE_ENTER value temp5 +> 122 LOAD_LOCAL(value temp5) > 122 IS_INSTANCE REF(class MyException) > 122 CZJUMP (BOOL)NE ? 7 : 8 -978c1074 +942c1037 < catch (IllegalArgumentException) in ArrayBuffer(6, 7, 8, 10, 11, 13) starting at: 3 --- > catch (IllegalArgumentException) in ArrayBuffer(6, 7, 8, 10, 11, 13, 14) starting at: 3 -1004c1100 +968c1063 < blocks: [1,2,3,4,5,9,10,11,13] --- > blocks: [1,2,3,4,5,9,10,11,13,14] -1028c1124,1133 +992c1087,1096 < 148 THROW(MyException) --- > ? STORE_LOCAL(value ex$3) @@ -202,16 +213,16 @@ > > 14: > 145 LOAD_LOCAL(value ex$3) -> 145 STORE_LOCAL(value temp7) -> 145 SCOPE_ENTER value temp7 -> 145 LOAD_LOCAL(value temp7) +> 145 STORE_LOCAL(value temp8) +> 145 SCOPE_ENTER value temp8 +> 145 LOAD_LOCAL(value temp8) > 145 IS_INSTANCE REF(class MyException) > 145 CZJUMP (BOOL)NE ? 4 : 5 -1272c1377 +1236c1340 < blocks: [1,2,3,4,5,7] --- > blocks: [1,2,3,4,5,7,8] -1296c1401,1408 +1260c1364,1371 < 38 THROW(IllegalArgumentException) --- > ? STORE_LOCAL(value e) @@ -222,16 +233,16 @@ > 42 CONSTANT("IllegalArgumentException") > 42 CALL_METHOD scala.Predef.println (dynamic) > 42 JUMP 2 -1345c1457 +1309c1420 < blocks: [1,2,3,4,5,7,8,10,11,13] --- > blocks: [1,2,3,4,5,7,8,10,11,13,14] -1369c1481,1482 +1333c1444,1445 < 203 THROW(MyException) --- > ? STORE_LOCAL(value ex$6) > ? JUMP 14 -1389c1502,1511 +1353c1465,1474 < 209 THROW(MyException) --- > ? STORE_LOCAL(value ex$6) @@ -239,16 +250,16 @@ > > 14: > 200 LOAD_LOCAL(value ex$6) -> 200 STORE_LOCAL(value temp16) -> 200 SCOPE_ENTER value temp16 -> 200 LOAD_LOCAL(value temp16) +> 200 STORE_LOCAL(value temp17) +> 200 SCOPE_ENTER value temp17 +> 200 LOAD_LOCAL(value temp17) > 200 IS_INSTANCE REF(class MyException) > 200 CZJUMP (BOOL)NE ? 4 : 5 -1452c1574 +1416c1537 < blocks: [1,2,3,4,5,7] --- > blocks: [1,2,3,4,5,7,8] -1476c1598,1605 +1440c1561,1568 < 58 THROW(IllegalArgumentException) --- > ? STORE_LOCAL(value e) @@ -259,11 +270,11 @@ > 62 CONSTANT("RuntimeException") > 62 CALL_METHOD scala.Predef.println (dynamic) > 62 JUMP 2 -1525c1654 +1489c1617 < blocks: [1,2,3,4] --- > blocks: [1,2,3,4,5] -1545c1674,1679 +1509c1637,1642 < 229 THROW(MyException) --- > ? JUMP 5 @@ -272,19 +283,19 @@ > ? LOAD_LOCAL(variable monitor1) > 228 MONITOR_EXIT > 228 THROW(Throwable) -1551c1685 +1515c1648 < ? THROW(Throwable) --- > 228 THROW(Throwable) -1579c1713 +1543c1676 < locals: value args, variable result, variable monitor2, variable monitorResult1 --- > locals: value exception$1, value args, variable result, variable monitor2, variable monitorResult1 -1581c1715 +1545c1678 < blocks: [1,2,3,4] --- > blocks: [1,2,3,4,5] -1604c1738,1746 +1568c1701,1709 < 245 THROW(MyException) --- > ? STORE_LOCAL(value exception$1) @@ -296,7 +307,7 @@ > ? LOAD_LOCAL(variable monitor2) > 244 MONITOR_EXIT > 244 THROW(Throwable) -1610c1752 +1574c1715 < ? THROW(Throwable) --- > 244 THROW(Throwable) diff --git a/test/files/scalap/caseClass/result.test b/test/files/scalap/caseClass/result.test index d243ae640b..a0dbc497fe 100644 --- a/test/files/scalap/caseClass/result.test +++ b/test/files/scalap/caseClass/result.test @@ -1,9 +1,11 @@ -case class CaseClass[A <: scala.Seq[scala.Int]](i : A, s : scala.Predef.String) extends java.lang.Object with scala.ScalaObject with scala.Product with scala.Serializable with scala.Product2[A, scala.Predef.String] { +case class CaseClass[A <: scala.Seq[scala.Int]](i : A, s : scala.Predef.String) extends java.lang.Object with scala.ScalaObject with scala.Product with scala.Serializable { val i : A = { /* compiled code */ } val s : scala.Predef.String = { /* compiled code */ } def foo : scala.Int = { /* compiled code */ } def copy[A <: scala.Seq[scala.Int]](i : A, s : scala.Predef.String) : CaseClass[A] = { /* compiled code */ } override def productPrefix : java.lang.String = { /* compiled code */ } + def productArity : scala.Int = { /* compiled code */ } + def productElement(x$1 : scala.Int) : scala.Any = { /* compiled code */ } override def productIterator : scala.collection.Iterator[scala.Any] = { /* compiled code */ } def canEqual(x$1 : scala.Any) : scala.Boolean = { /* compiled code */ } def _1 : A = { /* compiled code */ } |