diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-13 12:08:27 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-13 12:08:27 +0200 |
commit | 73a93505c432b410ae39fb3c4d6168b2e49832ce (patch) | |
tree | 53d45141a7b93682bea6430b0fb6ab28c3c3fad3 /tests/pending/run/t3038d.scala | |
parent | 89bacb9c25a58454ff1878e67f7ea07ffc8c269f (diff) | |
download | dotty-73a93505c432b410ae39fb3c4d6168b2e49832ce.tar.gz dotty-73a93505c432b410ae39fb3c4d6168b2e49832ce.tar.bz2 dotty-73a93505c432b410ae39fb3c4d6168b2e49832ce.zip |
Running rewrite tool on run tests.
Diffstat (limited to 'tests/pending/run/t3038d.scala')
-rw-r--r-- | tests/pending/run/t3038d.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/pending/run/t3038d.scala b/tests/pending/run/t3038d.scala index 44fb047b0..3dab07675 100644 --- a/tests/pending/run/t3038d.scala +++ b/tests/pending/run/t3038d.scala @@ -2,14 +2,14 @@ trait Foo { @transient protected var load = 1 @transient protected var a = 12 - protected def init[B](in: java.io.ObjectInputStream) { + protected def init[B](in: java.io.ObjectInputStream): Unit = { in.defaultReadObject load = in.readInt val sizea = in.readInt a = 12 } - protected def serializeTo(out: java.io.ObjectOutputStream) { + protected def serializeTo(out: java.io.ObjectOutputStream): Unit = { out.defaultWriteObject out.writeInt(load) out.writeInt(a) @@ -21,13 +21,13 @@ class Bar extends Foo with Serializable { def size = a @transient var second: Any = null - def checkMember { if (first == null) print("") } + def checkMember: Unit = { if (first == null) print("") } - private def writeObject(out: java.io.ObjectOutputStream) { + private def writeObject(out: java.io.ObjectOutputStream): Unit = { serializeTo(out) } - private def readObject(in: java.io.ObjectInputStream) { + private def readObject(in: java.io.ObjectInputStream): Unit = { first = null init(in) } @@ -48,7 +48,7 @@ object Test { } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { val a1 = new Bar() val serialized:Array[Byte] = toBytes(a1) val deserialized: Bar = toObject(serialized) |