summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library/scala/Option.scala3
-rw-r--r--src/library/scala/collection/immutable/List.scala4
-rw-r--r--test/files/jvm/innerClassAttribute/Test.scala6
-rw-r--r--test/files/jvm/javaReflection.check4
-rw-r--r--test/files/run/repl-javap-outdir-funs.flags1
-rw-r--r--test/files/run/repl-javap-outdir-funs/run-repl_7.scala5
-rw-r--r--test/files/run/t6260c.check4
-rw-r--r--test/files/run/t8549.scala5
-rw-r--r--test/files/run/t8601-closure-elim.flags2
9 files changed, 25 insertions, 9 deletions
diff --git a/src/library/scala/Option.scala b/src/library/scala/Option.scala
index 86dbffab92..41224f4c6c 100644
--- a/src/library/scala/Option.scala
+++ b/src/library/scala/Option.scala
@@ -94,6 +94,7 @@ object Option {
* @define bfinfo an implicit value of class `CanBuildFrom` which determines the result class `That` from the current
* representation type `Repr` and the new element type `B`.
*/
+@SerialVersionUID(-114498752079829388L) // value computed by serialver for 2.11.2, annotation added in 2.11.4
sealed abstract class Option[+A] extends Product with Serializable {
self =>
@@ -328,6 +329,7 @@ sealed abstract class Option[+A] extends Product with Serializable {
* @author Martin Odersky
* @version 1.0, 16/07/2003
*/
+@SerialVersionUID(1234815782226070388L) // value computed by serialver for 2.11.2, annotation added in 2.11.4
final case class Some[+A](x: A) extends Option[A] {
def isEmpty = false
def get = x
@@ -339,6 +341,7 @@ final case class Some[+A](x: A) extends Option[A] {
* @author Martin Odersky
* @version 1.0, 16/07/2003
*/
+@SerialVersionUID(5066590221178148012L) // value computed by serialver for 2.11.2, annotation added in 2.11.4
case object None extends Option[Nothing] {
def isEmpty = true
def get = throw new NoSuchElementException("None.get")
diff --git a/src/library/scala/collection/immutable/List.scala b/src/library/scala/collection/immutable/List.scala
index 9bfefc3de2..a46b4adabb 100644
--- a/src/library/scala/collection/immutable/List.scala
+++ b/src/library/scala/collection/immutable/List.scala
@@ -80,6 +80,7 @@ import java.io._
* @define mayNotTerminateInf
* @define willNotTerminateInf
*/
+@SerialVersionUID(-6084104484083858598L) // value computed by serialver for 2.11.2, annotation added in 2.11.4
sealed abstract class List[+A] extends AbstractSeq[A]
with LinearSeq[A]
with Product
@@ -427,13 +428,14 @@ case object Nil extends List[Nothing] {
}
/** A non empty list characterized by a head and a tail.
- * @param hd the first element of the list
+ * @param head the first element of the list
* @param tl the list containing the remaining elements of this list after the first one.
* @tparam B the type of the list elements.
* @author Martin Odersky
* @version 1.0, 15/07/2003
* @since 2.8
*/
+@SerialVersionUID(509929039250432923L) // value computed by serialver for 2.11.2, annotation added in 2.11.4
final case class ::[B](override val head: B, private[scala] var tl: List[B]) extends List[B] {
override def tail : List[B] = tl
override def isEmpty: Boolean = false
diff --git a/test/files/jvm/innerClassAttribute/Test.scala b/test/files/jvm/innerClassAttribute/Test.scala
index 882edbcdd7..1c1a0522e4 100644
--- a/test/files/jvm/innerClassAttribute/Test.scala
+++ b/test/files/jvm/innerClassAttribute/Test.scala
@@ -256,9 +256,9 @@ object Test extends BytecodeTest {
printInnerClassNodes("A20")
val fun1 = lambdaClass("A20$$anonfun$4", "A20$lambda$1")
- val fun2 = lambdaClass("A20$$anonfun$4$$anonfun$apply$1", "A20$lambda$$$anonfun$5$1")
- val fun3 = lambdaClass("A20$$anonfun$4$$anonfun$apply$3", "A20$lambda$$$anonfun$5$2")
- val fun4 = lambdaClass("A20$$anonfun$4$$anonfun$apply$3$$anonfun$apply$2", "A20$lambda$$$anonfun$7$1")
+ val fun2 = lambdaClass("A20$$anonfun$4$$anonfun$apply$1", "A20$lambda$$$nestedInAnonfun$5$1")
+ val fun3 = lambdaClass("A20$$anonfun$4$$anonfun$apply$3", "A20$lambda$$$nestedInAnonfun$5$2")
+ val fun4 = lambdaClass("A20$$anonfun$4$$anonfun$apply$3$$anonfun$apply$2", "A20$lambda$$$nestedInAnonfun$7$1")
println("fun1: attribute for itself and the two child closures `() => ()` and `() => () => 1`")
printInnerClassNodes(fun1)
diff --git a/test/files/jvm/javaReflection.check b/test/files/jvm/javaReflection.check
index aeb894f741..d40599507d 100644
--- a/test/files/jvm/javaReflection.check
+++ b/test/files/jvm/javaReflection.check
@@ -44,11 +44,11 @@ A$D$lambda$1 / A$D$lambda$1 (canon) / A$D$lambda$1 (simple)
- declared cls: List()
- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth)
- properties : false (local) / false (member)
-A$lambda$$$anonfun$7$1 / A$lambda$$$anonfun$7$1 (canon) / A$lambda$$$anonfun$7$1 (simple)
+A$lambda$$$lessinit$greater$1 / A$lambda$$$lessinit$greater$1 (canon) / A$lambda$$$lessinit$greater$1 (simple)
- declared cls: List()
- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth)
- properties : false (local) / false (member)
-A$lambda$$$lessinit$greater$1 / A$lambda$$$lessinit$greater$1 (canon) / A$lambda$$$lessinit$greater$1 (simple)
+A$lambda$$$nestedInAnonfun$7$1 / A$lambda$$$nestedInAnonfun$7$1 (canon) / A$lambda$$$nestedInAnonfun$7$1 (simple)
- declared cls: List()
- enclosing : null (declaring cls) / null (cls) / null (constr) / null (meth)
- properties : false (local) / false (member)
diff --git a/test/files/run/repl-javap-outdir-funs.flags b/test/files/run/repl-javap-outdir-funs.flags
new file mode 100644
index 0000000000..ac96850b69
--- /dev/null
+++ b/test/files/run/repl-javap-outdir-funs.flags
@@ -0,0 +1 @@
+-Ydelambdafy:inline \ No newline at end of file
diff --git a/test/files/run/repl-javap-outdir-funs/run-repl_7.scala b/test/files/run/repl-javap-outdir-funs/run-repl_7.scala
index 6c6fe2d515..af9651a8a3 100644
--- a/test/files/run/repl-javap-outdir-funs/run-repl_7.scala
+++ b/test/files/run/repl-javap-outdir-funs/run-repl_7.scala
@@ -1,6 +1,8 @@
import scala.tools.partest.JavapTest
object Test extends JavapTest {
+ // note the '-fun': it makes :javap search for some anonfun.
+ // for that reason, this test has a flags file that forces delambdafy:inline (doesn't allow :method)
def code = """
|:javap -fun disktest/Foo.class
""".stripMargin
@@ -11,7 +13,8 @@ object Test extends JavapTest {
if (scala.tools.partest.utils.Properties.isAvian)
true
else {
- def filtered = res filter (_ contains "public final class disktest.Foo")
+ val r = "public final class disktest.Foo.*extends scala.runtime.AbstractFunction1".r
+ def filtered = res filter (r.findFirstIn(_).nonEmpty)
1 == filtered.size
}
}
diff --git a/test/files/run/t6260c.check b/test/files/run/t6260c.check
index 1a57f2d741..78e9b27371 100644
--- a/test/files/run/t6260c.check
+++ b/test/files/run/t6260c.check
@@ -1,5 +1,9 @@
f(C@2e)
+#partest !-Ydelambdafy:method
Test$$anonfun$$apply
+#partest -Ydelambdafy:method
+Test$lambda$1$$apply
+#partest
apply
g(C@2e)
diff --git a/test/files/run/t8549.scala b/test/files/run/t8549.scala
index d3355208fa..cb254e3810 100644
--- a/test/files/run/t8549.scala
+++ b/test/files/run/t8549.scala
@@ -79,9 +79,12 @@ object Test extends App {
}
}
- // Generated on 20140505-14:47:14 with Scala version 2.11.1-20140505-142300-e8562571d2)
+ // Generated on 20141010-14:01:28 with Scala version 2.11.2)
overwrite.foreach(updateComment)
+ check(Some(1))("rO0ABXNyAApzY2FsYS5Tb21lESLyaV6hi3QCAAFMAAF4dAASTGphdmEvbGFuZy9PYmplY3Q7eHIADHNjYWxhLk9wdGlvbv5pN/3bDmZ0AgAAeHBzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAQ==")
+ check(None)("rO0ABXNyAAtzY2FsYS5Ob25lJEZQJPZTypSsAgAAeHIADHNjYWxhLk9wdGlvbv5pN/3bDmZ0AgAAeHA=")
+
check(List(1, 2, 3))( "rO0ABXNyADJzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5MaXN0JFNlcmlhbGl6YXRpb25Qcm94eQAAAAAAAAABAwAAeHBzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAXNxAH4AAgAAAAJzcQB+AAIAAAADc3IALHNjYWxhLmNvbGxlY3Rpb24uaW1tdXRhYmxlLkxpc3RTZXJpYWxpemVFbmQkilxjW/dTC20CAAB4cHg=")
check(Nil)( "rO0ABXNyADJzY2FsYS5jb2xsZWN0aW9uLmltbXV0YWJsZS5MaXN0JFNlcmlhbGl6YXRpb25Qcm94eQAAAAAAAAABAwAAeHBzcgAsc2NhbGEuY29sbGVjdGlvbi5pbW11dGFibGUuTGlzdFNlcmlhbGl6ZUVuZCSKXGNb91MLbQIAAHhweA==")
diff --git a/test/files/run/t8601-closure-elim.flags b/test/files/run/t8601-closure-elim.flags
index 49d036a887..2b5fd8a7b2 100644
--- a/test/files/run/t8601-closure-elim.flags
+++ b/test/files/run/t8601-closure-elim.flags
@@ -1 +1 @@
--optimize
+-optimize -Ydelambdafy:inline