summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/api
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2014-07-14 19:12:47 +0200
committerPhilipp Haller <hallerp@gmail.com>2014-07-15 14:04:08 +0200
commitf15a289ec5c192ced30970bd9ab23cbf38ead92e (patch)
tree70121ecf071b944746c29d9c1d5121d1ea5f7a56 /src/reflect/scala/reflect/api
parent5762110d0dc2cb492e34d5595c473aa0f9ca786a (diff)
downloadscala-f15a289ec5c192ced30970bd9ab23cbf38ead92e.tar.gz
scala-f15a289ec5c192ced30970bd9ab23cbf38ead92e.tar.bz2
scala-f15a289ec5c192ced30970bd9ab23cbf38ead92e.zip
Add SerialVersionUID to SerializedTypeTag and SerializedExpr
The reason for adding the SerialVersionUID annotations is to be able to provide serialization stability throughout the 2.11.x series. And since type tags (and exprs) have not been serializable before, this does not break serialization for existing code.
Diffstat (limited to 'src/reflect/scala/reflect/api')
-rw-r--r--src/reflect/scala/reflect/api/Exprs.scala1
-rw-r--r--src/reflect/scala/reflect/api/TypeTags.scala3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/api/Exprs.scala b/src/reflect/scala/reflect/api/Exprs.scala
index 6d401b5a79..3230fdbc67 100644
--- a/src/reflect/scala/reflect/api/Exprs.scala
+++ b/src/reflect/scala/reflect/api/Exprs.scala
@@ -163,6 +163,7 @@ trait Exprs { self: Universe =>
}
}
+@SerialVersionUID(1L)
private[scala] class SerializedExpr(var treec: TreeCreator, var tag: ru.WeakTypeTag[_]) extends Serializable {
import scala.reflect.runtime.universe.{Expr, runtimeMirror}
diff --git a/src/reflect/scala/reflect/api/TypeTags.scala b/src/reflect/scala/reflect/api/TypeTags.scala
index 1d53453bde..7db375ca61 100644
--- a/src/reflect/scala/reflect/api/TypeTags.scala
+++ b/src/reflect/scala/reflect/api/TypeTags.scala
@@ -349,8 +349,7 @@ trait TypeTags { self: Universe =>
// This class should be final, but we can't do that in Scala 2.11.x without breaking
// binary incompatibility.
-// Since instances of this class are serialized, this class should have a
-// SerialVersionUID annotation.
+@SerialVersionUID(1L)
private[scala] class SerializedTypeTag(var tpec: TypeCreator, var concrete: Boolean) extends Serializable {
import scala.reflect.runtime.universe.{TypeTag, WeakTypeTag, runtimeMirror}
@throws(classOf[ObjectStreamException])