summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ochsenreither <simon@ochsenreither.de>2012-09-18 03:44:59 +0200
committerSimon Ochsenreither <simon@ochsenreither.de>2012-10-08 05:25:05 +0200
commite3cec78518a0529152fe6beda3cc6c9a14ea0f9b (patch)
tree698c3061231891efc96d10eb70792b857a6cf2db
parentc52f91ca0db573fdfc879ae199a237db256d7523 (diff)
downloadscala-e3cec78518a0529152fe6beda3cc6c9a14ea0f9b.tar.gz
scala-e3cec78518a0529152fe6beda3cc6c9a14ea0f9b.tar.bz2
scala-e3cec78518a0529152fe6beda3cc6c9a14ea0f9b.zip
SI-6388 Remove first parts of deprecated @serializable annotation
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala1
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala1
-rw-r--r--src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala13
-rw-r--r--src/compiler/scala/tools/nsc/doc/html/SyntaxHigh.scala2
-rw-r--r--src/library/scala/package.scala6
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala5
-rw-r--r--test/files/jvm/t1143-2/t1143-2.scala26
-rw-r--r--test/files/jvm/t1143.scala12
-rw-r--r--test/files/jvm/t1600.scala3
-rw-r--r--test/files/jvm/typerep.scala26
-rw-r--r--test/files/pos/annotations.scala2
-rw-r--r--test/files/pos/attributes.scala2
-rw-r--r--test/files/pos/spec-annotations.scala2
-rw-r--r--test/files/pos/t1385.scala4
-rw-r--r--test/files/pos/t640.scala4
-rw-r--r--test/files/run/t3038d.scala4
-rw-r--r--test/files/run/t3667.check3
-rw-r--r--test/files/run/t3667.scala35
18 files changed, 28 insertions, 123 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
index eb38a80d60..34d46e27fe 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
@@ -1342,7 +1342,6 @@ abstract class GenASM extends SubComponent with BytecodeWriters {
// Additional interface parents based on annotations and other cues
def newParentForAttr(attr: Symbol): Option[Symbol] = attr match {
- case SerializableAttr => Some(SerializableClass)
case CloneableAttr => Some(CloneableClass)
case RemoteAttr => Some(RemoteInterfaceClass)
case _ => None
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
index e11704d694..617c641fa9 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
@@ -218,7 +218,6 @@ abstract class GenJVM extends SubComponent with GenJVMUtil with GenAndroid with
// Additional interface parents based on annotations and other cues
def newParentForAttr(attr: Symbol): Option[Symbol] = attr match {
- case SerializableAttr => Some(SerializableClass)
case CloneableAttr => Some(JavaCloneableClass)
case RemoteAttr => Some(RemoteInterfaceClass)
case _ => None
diff --git a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala
index 242b60c769..39ea074dc0 100644
--- a/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala
+++ b/src/compiler/scala/tools/nsc/backend/msil/GenMSIL.scala
@@ -124,7 +124,6 @@ abstract class GenMSIL extends SubComponent {
// Scala attributes
// symtab.Definitions -> object (singleton..)
- val SerializableAttr = definitions.SerializableAttr.tpe
val CloneableAttr = definitions.CloneableAttr.tpe
val TransientAtt = definitions.TransientAttr.tpe
// remoting: the architectures are too different, no mapping (no portable code
@@ -1633,18 +1632,6 @@ abstract class GenMSIL extends SubComponent {
mf = mf | (if (sym hasFlag Flags.ABSTRACT) TypeAttributes.Abstract else 0)
mf = mf | (if (sym.isTrait && !sym.isImplClass) TypeAttributes.Interface else TypeAttributes.Class)
mf = mf | (if (sym isFinal) TypeAttributes.Sealed else 0)
-
- sym.annotations foreach { a => a match {
- case AnnotationInfo(SerializableAttr, _, _) =>
- // TODO: add the Serializable TypeAttribute also if the annotation
- // System.SerializableAttribute is present (.net annotation, not scala)
- // Best way to do it: compare with
- // definitions.getClass("System.SerializableAttribute").tpe
- // when frontend available
- mf = mf | TypeAttributes.Serializable
- case _ => ()
- }}
-
mf
// static: not possible (or?)
}
diff --git a/src/compiler/scala/tools/nsc/doc/html/SyntaxHigh.scala b/src/compiler/scala/tools/nsc/doc/html/SyntaxHigh.scala
index e21ee07963..01c0b78efe 100644
--- a/src/compiler/scala/tools/nsc/doc/html/SyntaxHigh.scala
+++ b/src/compiler/scala/tools/nsc/doc/html/SyntaxHigh.scala
@@ -40,7 +40,7 @@ private[html] object SyntaxHigh {
/** Standard library classes/objects, sorted alphabetically */
val standards = Array (
- "WeakTypeTag", "Any", "AnyRef", "AnyVal", "App", "Application", "Array",
+ "WeakTypeTag", "Any", "AnyRef", "AnyVal", "App", "Array",
"Boolean", "Byte", "Char", "Class", "ClassTag", "ClassManifest",
"Console", "Double", "Enumeration", "Float", "Function", "Int",
"List", "Long", "Manifest", "Map",
diff --git a/src/library/scala/package.scala b/src/library/scala/package.scala
index a41cdedfa9..9b7ca64b7e 100644
--- a/src/library/scala/package.scala
+++ b/src/library/scala/package.scala
@@ -34,9 +34,6 @@ package object scala {
override def toString = "object AnyRef"
}
- @deprecated("instead of `@serializable class C`, use `class C extends Serializable`", "2.9.0")
- type serializable = annotation.serializable
-
@deprecated("instead of `@cloneable class C`, use `class C extends Cloneable`", "2.10.0")
type cloneable = annotation.cloneable
@@ -126,9 +123,8 @@ package object scala {
type deprecatedName = annotation.deprecatedName
type inline = annotation.inline
type native = annotation.native
- type noinline = noannotation.inline
+ type noinline = annotation.noinline
type remote = annotation.remote
- type serializable = annotation.serializable
type specialized = annotation.specialized
type transient = annotation.transient
type throws = annotation.throws
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index 13436f4251..a252437bcf 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -709,10 +709,7 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
}
def isStrictFP = hasAnnotation(ScalaStrictFPAttr) || (enclClass hasAnnotation ScalaStrictFPAttr)
- def isSerializable = (
- info.baseClasses.exists(p => p == SerializableClass || p == JavaSerializableClass)
- || hasAnnotation(SerializableAttr) // last part can be removed, @serializable annotation is deprecated
- )
+ def isSerializable = info.baseClasses.exists(p => p == SerializableClass || p == JavaSerializableClass)
def hasBridgeAnnotation = hasAnnotation(BridgeClass)
def isDeprecated = hasAnnotation(DeprecatedAttr)
def deprecationMessage = getAnnotation(DeprecatedAttr) flatMap (_ stringArg 0)
diff --git a/test/files/jvm/t1143-2/t1143-2.scala b/test/files/jvm/t1143-2/t1143-2.scala
index 44b1febd8b..13ab13b48c 100644
--- a/test/files/jvm/t1143-2/t1143-2.scala
+++ b/test/files/jvm/t1143-2/t1143-2.scala
@@ -16,43 +16,39 @@ object Serialize {
}
}
-@serializable
@SerialVersionUID(1L)
-class VarModel[T]( getter: => T, setter: T => Unit )
-{
+class VarModel[T](getter: => T, setter: T => Unit) extends Serializable {
Serialize.write(getter)
Serialize.write(setter)
- def this( getter: => T ) = this( getter, null )
+ def this(getter: => T) = this(getter, null)
def getObject: AnyRef = getter.asInstanceOf[AnyRef]
- def setObject( v: AnyRef ) = {
- if( setter==null )
- throw new RuntimeException( "Tried to set readonly model!")
- setter( v.asInstanceOf[T] )
+ def setObject(v: AnyRef) = {
+ if(setter==null)
+ throw new RuntimeException("Tried to set readonly model!")
+ setter(v.asInstanceOf[T])
}
def detach = ()
}
-@serializable
@SerialVersionUID(1L)
-class Printer( p: VarModel[String] ) {
- def print = println( p.getObject );
+class Printer(p: VarModel[String]) extends Serializable {
+ def print = println(p.getObject)
}
class Component extends Marker { }
class Form extends Component { }
-@serializable
@SerialVersionUID(1L)
-class Main {
+class Main extends Serializable {
var pass = "pass"
- def main(args : Array[String]) : Unit = {
+ def main(args: Array[String]): Unit = {
val f = new Form {
- val p = new Printer( new VarModel( pass, s => pass = s ) );
+ val p = new Printer(new VarModel(pass, s => pass = s))
p.print
}
()
diff --git a/test/files/jvm/t1143.scala b/test/files/jvm/t1143.scala
index 7dd374f432..eb03c7224e 100644
--- a/test/files/jvm/t1143.scala
+++ b/test/files/jvm/t1143.scala
@@ -16,9 +16,8 @@ object Serialize {
}
}
-@serializable
@SerialVersionUID(1L)
-class VarModel[T](getter: => T, setter: T => Unit) {
+class VarModel[T](getter: => T, setter: T => Unit) extends Serializable {
Serialize.write(getter)
Serialize.write(setter)
@@ -35,23 +34,20 @@ class VarModel[T](getter: => T, setter: T => Unit) {
def detach = ()
}
-@serializable
@SerialVersionUID(1L)
-class Printer(p: VarModel[String]) {
+class Printer(p: VarModel[String]) extends Serializable {
def print = println(p.getObject)
}
-@serializable
@SerialVersionUID(1L)
-class Component {
+class Component extends Serializable {
}
class Form extends Component {
}
-@serializable
@SerialVersionUID(1L)
-class Main {
+class Main extends Serializable {
var pass = "pass"
def main(args: Array[String]) {
val f = new Form {
diff --git a/test/files/jvm/t1600.scala b/test/files/jvm/t1600.scala
index 7e23687425..69179c1ba4 100644
--- a/test/files/jvm/t1600.scala
+++ b/test/files/jvm/t1600.scala
@@ -69,8 +69,7 @@ object Test {
var hashCodeModifier = 0
}
- @serializable
- class Foo {
+ class Foo extends Serializable {
override def hashCode = System.identityHashCode(this) + Foo.hashCodeModifier
}
}
diff --git a/test/files/jvm/typerep.scala b/test/files/jvm/typerep.scala
index 3befc7ff3f..47bd16a467 100644
--- a/test/files/jvm/typerep.scala
+++ b/test/files/jvm/typerep.scala
@@ -280,100 +280,74 @@ object TypeRep {
override def toString = "Nothing"
}
- @serializable
case class ClassRep[A](elemRep: TypeRep[A]) extends TypeRep[Class[A]] {
override def toString = "Class[" + elemRep + "]"
}
- @serializable
case class SomeRep[A](elemRep: TypeRep[A]) extends TypeRep[Some[A]] {
override def toString = "Some[" + elemRep + "]"
}
- @serializable
case class NoneRep[A](elemRep: TypeRep[A]) extends TypeRep[Option[A]] {
override def toString = "None[" + elemRep + "]"
}
-
- @serializable
case class ListRep[A](elemRep: TypeRep[A]) extends TypeRep[List[A]] {
override def toString = "List[" + elemRep + "]"
}
-
- @serializable
case class ArrayRep[A](elemRep: TypeRep[A]) extends TypeRep[Array[A]] {
override def toString = "Array[" + elemRep + "]"
}
-
- @serializable
case class Tuple2Rep[A1, A2](_1: TypeRep[A1], _2: TypeRep[A2]) extends TypeRep[(A1, A2)] {
override def toString = "Tuple2[" + _1 + ", " + _2 + "]"
}
- @serializable
case class Tuple3Rep[A1, A2, A3](_1: TypeRep[A1], _2: TypeRep[A2], _3: TypeRep[A3]) extends TypeRep[Tuple3[A1, A2, A3]] {
override def toString = "Tuple3[" + _1 + ", " + _2 + ", " + _3 + "]"
}
- @serializable
case class Tuple4Rep[A1, A2, A3, A4](_1: TypeRep[A1], _2: TypeRep[A2], _3: TypeRep[A3], _4: TypeRep[A4]) extends TypeRep[Tuple4[A1, A2, A3, A4]] {
override def toString = "Tuple4[" + _1 + ", " + _2 + ", " + _3 + ", " + _4 + "]"
}
- @serializable
case class Tuple5Rep[A1, A2, A3, A4, A5](_1: TypeRep[A1], _2: TypeRep[A2], _3: TypeRep[A3], _4: TypeRep[A4], _5: TypeRep[A5]) extends TypeRep[Tuple5[A1, A2, A3, A4, A5]] {
override def toString = "Tuple5[" + _1 + ", " + _2 + ", " + _3 + ", " + _4 + ", " + _5 + "]"
}
- @serializable
case class Tuple6Rep[A1, A2, A3, A4, A5, A6](val _1: TypeRep[A1], val _2: TypeRep[A2], val _3: TypeRep[A3], val _4: TypeRep[A4], val _5: TypeRep[A5], val _6: TypeRep[A6]) extends TypeRep[Tuple6[A1, A2, A3, A4, A5, A6]] {
override def toString = "Tuple6[" + _1 + ", " + _2 + ", " + _3 + ", " + _4 + ", " + _5 + ", " + _6 + "]"
}
- @serializable
case class Tuple7Rep[A1, A2, A3, A4, A5, A6, A7](val _1: TypeRep[A1], val _2: TypeRep[A2], val _3: TypeRep[A3], val _4: TypeRep[A4], val _5: TypeRep[A5], val _6: TypeRep[A6], val _7: TypeRep[A7]) extends TypeRep[Tuple7[A1, A2, A3, A4, A5, A6, A7]] {
override def toString = "Tuple7[" + _1 + ", " + _2 + ", " + _3 + ", " + _4 + ", " + _5 + ", " + _6 + ", " + _7 + "]"
}
- @serializable
case class Tuple8Rep[A1, A2, A3, A4, A5, A6, A7, A8](val _1: TypeRep[A1], val _2: TypeRep[A2], val _3: TypeRep[A3], val _4: TypeRep[A4], val _5: TypeRep[A5], val _6: TypeRep[A6], val _7: TypeRep[A7], val _8: TypeRep[A8]) extends TypeRep[Tuple8[A1, A2, A3, A4, A5, A6, A7, A8]] {
override def toString = "Tuple8[" + _1 + ", " + _2 + ", " + _3 + ", " + _4 + ", " + _5 + ", " + _6 + ", " + _7 + ", " + _8 + "]"
}
- @serializable
case class Tuple9Rep[A1, A2, A3, A4, A5, A6, A7, A8, A9](val _1: TypeRep[A1], val _2: TypeRep[A2], val _3: TypeRep[A3], val _4: TypeRep[A4], val _5: TypeRep[A5], val _6: TypeRep[A6], val _7: TypeRep[A7], val _8: TypeRep[A8], val _9: TypeRep[A9]) extends TypeRep[Tuple9[A1, A2, A3, A4, A5, A6, A7, A8, A9]] {
override def toString = "Tuple9[" + _1 + ", " + _2 + ", " + _3 + ", " + _4 + ", " + _5 + ", " + _6 + ", " + _7 + ", " + _8 + ", " + _9 + "]"
}
- @serializable
case class Function1Rep[A1, B](a1: TypeRep[A1], b: TypeRep[B]) extends TypeRep[Function1[A1, B]] {
override def toString = "Function1[" + a1 + ", " + b + "]"
}
- @serializable
case class Function2Rep[A1, A2, B](a1: TypeRep[A1], a2: TypeRep[A2], b: TypeRep[B]) extends TypeRep[Function2[A1, A2, B]] {
override def toString = "Function2[" + a1 + ", " + a2 + ", " + b + "]"
}
- @serializable
case class Function3Rep[A1, A2, A3, B](a1: TypeRep[A1], a2: TypeRep[A2], a3: TypeRep[A3], b: TypeRep[B]) extends TypeRep[Function3[A1, A2, A3, B]] {
override def toString = "Function3[" + a1 + ", " + a2 + ", " + a3 + ", " + b + "]"
}
- @serializable
case class Function4Rep[A1, A2, A3, A4, B](a1: TypeRep[A1], a2: TypeRep[A2], a3: TypeRep[A3], a4: TypeRep[A4], b: TypeRep[B]) extends TypeRep[Function4[A1, A2, A3, A4, B]] {
override def toString = "Function4[" + a1 + ", " + a2 + ", " + a3 + ", " + a4 + ", " + b + "]"
}
- @serializable
case class Function5Rep[A1, A2, A3, A4, A5, B](a1: TypeRep[A1], a2: TypeRep[A2], a3: TypeRep[A3], a4: TypeRep[A4], a5: TypeRep[A5], b: TypeRep[B]) extends TypeRep[Function5[A1, A2, A3, A4, A5, B]] {
override def toString = "Function5[" + a1 + ", " + a2 + ", " + a3 + ", " + a4 + ", " + a5 + ", " + b + "]"
}
- @serializable
case class Function6Rep[A1, A2, A3, A4, A5, A6, B](a1: TypeRep[A1], a2: TypeRep[A2], a3: TypeRep[A3], a4: TypeRep[A4], a5: TypeRep[A5], a6: TypeRep[A6], b: TypeRep[B]) extends TypeRep[Function6[A1, A2, A3, A4, A5, A6, B]] {
override def toString = "Function6[" + a1 + ", " + a2 + ", " + a3 + ", " + a4 + ", " + a5 + ", " + a6 + ", " + b + "]"
}
- @serializable
case class Function7Rep[A1, A2, A3, A4, A5, A6, A7, B](a1: TypeRep[A1], a2: TypeRep[A2], a3: TypeRep[A3], a4: TypeRep[A4], a5: TypeRep[A5], a6: TypeRep[A6], a7: TypeRep[A7], b: TypeRep[B]) extends TypeRep[Function7[A1, A2, A3, A4, A5, A6, A7, B]] {
override def toString = "Function7[" + a1 + ", " + a2 + ", " + a3 + ", " + a4 + ", " + a5 + ", " + a6 + ", " + a7 + ", " + b + "]"
}
- @serializable
case class Function8Rep[A1, A2, A3, A4, A5, A6, A7, A8, B](a1: TypeRep[A1], a2: TypeRep[A2], a3: TypeRep[A3], a4: TypeRep[A4], a5: TypeRep[A5], a6: TypeRep[A6], a7: TypeRep[A7], a8: TypeRep[A8], b: TypeRep[B]) extends TypeRep[Function8[A1, A2, A3, A4, A5, A6, A7, A8, B]] {
override def toString = "Function8[" + a1 + ", " + a2 + ", " + a3 + ", " + a4 + ", " + a5 + ", " + a6 + ", " + a7 + ", " + a8 + b + "]"
}
- @serializable
case class Function9Rep[A1, A2, A3, A4, A5, A6, A7, A8, A9, B](a1: TypeRep[A1], a2: TypeRep[A2], a3: TypeRep[A3], a4: TypeRep[A4], a5: TypeRep[A5], a6: TypeRep[A6], a7: TypeRep[A7], a8: TypeRep[A8], a9: TypeRep[A9], b: TypeRep[B]) extends TypeRep[Function9[A1, A2, A3, A4, A5, A6, A7, A8, A9, B]] {
override def toString = "Function9[" + a1 + ", " + a2 + ", " + a3 + ", " + a4 + ", " + a5 + ", " + a6 + ", " + a7 + ", " + a8 + ", " + b + "]"
}
/*
- @serializable
case class ObjectRep[A](c: Class) extends TypeRep[A] {
override def toString = c.getName
}
diff --git a/test/files/pos/annotations.scala b/test/files/pos/annotations.scala
index 706a715bad..501e2a6bd3 100644
--- a/test/files/pos/annotations.scala
+++ b/test/files/pos/annotations.scala
@@ -2,7 +2,7 @@ class ann(i: Int) extends scala.annotation.Annotation
class cfann(x: String) extends annotation.ClassfileAnnotation
// annotations on abstract types
-abstract class C1[@serializable @cloneable +T, U, V[_]]
+abstract class C1[@cloneable +T, U, V[_]]
abstract class C2[@deprecated
@ann(1) T <: Number,
V]
diff --git a/test/files/pos/attributes.scala b/test/files/pos/attributes.scala
index ec735d0aae..60e00bff7d 100644
--- a/test/files/pos/attributes.scala
+++ b/test/files/pos/attributes.scala
@@ -1,3 +1,5 @@
+class serializable extends annotation.StaticAnnotation
+
@serializable class C1;
@serializable @volatile class C2;
@serializable @volatile class C3;
diff --git a/test/files/pos/spec-annotations.scala b/test/files/pos/spec-annotations.scala
index 48281e5df5..6c1f737470 100644
--- a/test/files/pos/spec-annotations.scala
+++ b/test/files/pos/spec-annotations.scala
@@ -1,7 +1,7 @@
class ann(i: Int) extends scala.annotation.Annotation
// annotations on abstract types
-abstract class C1[@serializable @cloneable +T, U, V[_]]
+abstract class C1[@cloneable +T, U, V[_]]
abstract class C2[@deprecated
@ann(1) T <: Number,
V]
diff --git a/test/files/pos/t1385.scala b/test/files/pos/t1385.scala
index 59953bcc39..6fe7308281 100644
--- a/test/files/pos/t1385.scala
+++ b/test/files/pos/t1385.scala
@@ -1,3 +1,3 @@
-@serializable object Test {
- private def readResolve:AnyRef = this
+object Test extends Serializable {
+ private def readResolve: AnyRef = this
}
diff --git a/test/files/pos/t640.scala b/test/files/pos/t640.scala
index 55f61df8af..45608bc3d4 100644
--- a/test/files/pos/t640.scala
+++ b/test/files/pos/t640.scala
@@ -1,2 +1,2 @@
-@serializable class A
-@serializable class B extends A
+class A extends Serializable
+class B extends A with Serializable
diff --git a/test/files/run/t3038d.scala b/test/files/run/t3038d.scala
index 6cd2d83776..9550165235 100644
--- a/test/files/run/t3038d.scala
+++ b/test/files/run/t3038d.scala
@@ -16,9 +16,7 @@ trait Foo {
}
}
-
-@serializable
-class Bar extends Foo {
+class Bar extends Foo with Serializable {
@transient protected var first: Any = null
def size = a
@transient var second: Any = null
diff --git a/test/files/run/t3667.check b/test/files/run/t3667.check
index bbe5d1bc48..6375c88997 100644
--- a/test/files/run/t3667.check
+++ b/test/files/run/t3667.check
@@ -1,6 +1,3 @@
-1
-2
-3
4
2
3
diff --git a/test/files/run/t3667.scala b/test/files/run/t3667.scala
index f30d57ce3a..ada09d5886 100644
--- a/test/files/run/t3667.scala
+++ b/test/files/run/t3667.scala
@@ -1,27 +1,9 @@
object Test {
def main(args: Array[String]) {
- val o1 = new Outer1
- val o2 = new Outer2
- val o3 = new Outer3
val o4 = new Outer4
val o5 = new Outer5
val o6 = new Outer6
- println(1)
- ser(new o1.Inner(1))
- o1.Inner // make sure the Inner$module field of the Outer1 instance is initialized!
- ser(new o1.Inner(1))
-
- println(2)
- ser(new o2.Inner(1))
- o2.Inner
- ser(new o2.Inner(1))
-
- println(3)
- ser(new o3.Inner(1))
- o3.Inner
- ser(new o3.Inner(1))
-
println(4)
ser(new o4.Inner(1))
o4.Inner
@@ -54,23 +36,6 @@ object Test {
}
-@serializable
-class Outer1 {
- @serializable
- class Inner(x: Int = 1)
-}
-
-@serializable
-class Outer2 {
- case class Inner(x: Int = 1)
-}
-
-@serializable
-class Outer3 {
- case class Inner(x: Int)
-}
-
-
class Outer4 extends Serializable {
class Inner(x: Int = 1) extends Serializable
}