From 4be5e11cccace4974ed9a449052455392570139f Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Tue, 30 Nov 2010 15:38:56 +0000 Subject: Deprecated the @serializable annotation, introd... Deprecated the @serializable annotation, introduce a new trait "scala.Serializable" which has to be extended instead (cross-platform). Known issues: - Companion objects of serializable classes (including case classes) are automatically made serializable. However, they don't extend "Serializable" statically because of the known difficulty (should be done before typing, but hard). - Writing "case class C() extends Serializable" gives "error: trait Serializable is inherited twice" - Functions are serializable, but don't extend Serializable dynamically (could be fixed by making FunctionN Serializable - shouldn't we?) Note that @SerialVersionUID continues to be an annotation; it generates a static field, which is not possible otherwise in scala. Review by dragos, extempore. Question to dragos: in JavaPlatform.isMaybeBoxed, why is there a test for "JavaSerializableClass"? Is that correct? --- test/files/scalap/caseObject/result.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/files/scalap/caseObject') diff --git a/test/files/scalap/caseObject/result.test b/test/files/scalap/caseObject/result.test index d888191919..d4e90a0375 100644 --- a/test/files/scalap/caseObject/result.test +++ b/test/files/scalap/caseObject/result.test @@ -1,4 +1,4 @@ -case object CaseObject extends java.lang.Object with scala.ScalaObject with scala.Product { +case object CaseObject extends java.lang.Object with scala.ScalaObject with scala.Product with scala.Serializable { def bar : scala.Int = { /* compiled code */ } final override def toString() : java.lang.String = { /* compiled code */ } override def productPrefix : java.lang.String = { /* compiled code */ } -- cgit v1.2.3