summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorJames Iry <jamesiry@gmail.com>2013-02-11 11:07:47 -0800
committerJames Iry <jamesiry@gmail.com>2013-02-11 11:07:47 -0800
commit8bf9bbf557c2ce0778327f82e4599ddea97a3da8 (patch)
tree24ba7b8146a1138acac3556b133ef87d6df6ae29 /test/files/run
parent74fc185bcdc37f6a5362e499cb4adf42c18e89e6 (diff)
parentc049d66c54c4f255bc0de70b2fd4ec559df7ebcd (diff)
downloadscala-8bf9bbf557c2ce0778327f82e4599ddea97a3da8.tar.gz
scala-8bf9bbf557c2ce0778327f82e4599ddea97a3da8.tar.bz2
scala-8bf9bbf557c2ce0778327f82e4599ddea97a3da8.zip
Merge pull request #2097 from ViniciusMiana/SI-6935
SI-6935 Added readResolve in BoxedUnit
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/t6935.scala14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/files/run/t6935.scala b/test/files/run/t6935.scala
new file mode 100644
index 0000000000..dea2d7f2e2
--- /dev/null
+++ b/test/files/run/t6935.scala
@@ -0,0 +1,14 @@
+object Test {
+
+ def main(args: Array[String]): Unit = {
+ import java.io._
+ val bytes = new ByteArrayOutputStream()
+ val out = new ObjectOutputStream(bytes)
+ out.writeObject(())
+ out.close()
+ val buf = bytes.toByteArray
+ val in = new ObjectInputStream(new ByteArrayInputStream(buf))
+ val unit = in.readObject()
+ assert(unit == ())
+ }
+}