summaryrefslogtreecommitdiff
path: root/test/files/jvm/t2511.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-12-11 14:57:06 +0000
committerPaul Phillips <paulp@improving.org>2010-12-11 14:57:06 +0000
commit262ee3a852f278f97b083a05376de0eab96c805d (patch)
tree482c62113aeb64e1bc7170610a958d58ec60cd19 /test/files/jvm/t2511.scala
parent4cfcc156f404f574451d2ddcaf62326d32d0ef95 (diff)
downloadscala-262ee3a852f278f97b083a05376de0eab96c805d.tar.gz
scala-262ee3a852f278f97b083a05376de0eab96c805d.tar.bz2
scala-262ee3a852f278f97b083a05376de0eab96c805d.zip
When was the last time -Xcheckinit was run? It ...
When was the last time -Xcheckinit was run? It must have been a long time. All these changes are to address bugs revealed by -Xcheckinit, mostly in test cases, some in the compiler. I'm guessing the partest -Xcheckinit runs are hanging the first time they run into a failure, so if it starts "working" again after this commit don't get too confident. No review.
Diffstat (limited to 'test/files/jvm/t2511.scala')
-rw-r--r--test/files/jvm/t2511.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/files/jvm/t2511.scala b/test/files/jvm/t2511.scala
index d4b5e83d0f..eb57dc503d 100644
--- a/test/files/jvm/t2511.scala
+++ b/test/files/jvm/t2511.scala
@@ -4,6 +4,7 @@ object Test {
trait IMyMessage extends Serializable {
@transient var message: String = null
+ var message2: String = null
}
class MyMessage extends IMyMessage
@@ -13,6 +14,7 @@ object Test {
val out = new ObjectOutputStream(buf)
val m = new MyMessage
m.message = "foo"
+ m.message2 = "bippy"
out.writeObject(m)
out.flush
buf.toByteArray
@@ -25,6 +27,9 @@ object Test {
def main(args: Array[String]) {
val m = unserialize(serialize)
- println(m.message)
+ // Xcheckinit freaks out here but its nullness is what we're testing
+ try println(m.message)
+ catch { case _: UninitializedFieldError => println("null") }
+ println(m.message2)
}
}