summaryrefslogtreecommitdiff
path: root/test/files/run/t9375.check
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2015-07-29 11:39:04 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2015-09-22 07:15:57 +0200
commit9a47e8124aaa2a94737ea3f01ef2fa1e95f91c49 (patch)
tree428c4c8435d6dfe99b4aeef971cf83e490dc5588 /test/files/run/t9375.check
parent0f72dd37f85bbcaa07cfb325685dc019e6bc1c26 (diff)
downloadscala-9a47e8124aaa2a94737ea3f01ef2fa1e95f91c49.tar.gz
scala-9a47e8124aaa2a94737ea3f01ef2fa1e95f91c49.tar.bz2
scala-9a47e8124aaa2a94737ea3f01ef2fa1e95f91c49.zip
[backport] SI-9375 add synthetic readResolve only for static modules
For inner modules, the synthetic readResolve method would cause the module constructor to be invoked on de-serialization in certain situations. See the discussion in the ticket. Adds a comprehensive test around serializing and de-serializing modules.
Diffstat (limited to 'test/files/run/t9375.check')
-rw-r--r--test/files/run/t9375.check60
1 files changed, 60 insertions, 0 deletions
diff --git a/test/files/run/t9375.check b/test/files/run/t9375.check
new file mode 100644
index 0000000000..87551dccd1
--- /dev/null
+++ b/test/files/run/t9375.check
@@ -0,0 +1,60 @@
+ konstruktor: class A
+ konstruktor: class A$O$12$
+ konstruktor: class A$$anon$1
+ konstruktor: class A$A
+ konstruktor: class A$C
+ konstruktor: class C
+ konstruktor: class T$O$15$
+ konstruktor: class T$$anon$2
+ konstruktor: class T$A
+ konstruktor: class T$C
+ konstruktor: class A$N$
+ konstruktor: class T$N$
+serializing outer objects should not initialize any nested objects
+now initializing nested objects
+ konstruktor: class A$O$
+ konstruktor: class A$Op$
+ konstruktor: class A$N$O$
+ konstruktor: class A$N$Op$
+ konstruktor: class A$A$O$
+ konstruktor: class A$A$Op$
+ konstruktor: class A$T$O$
+ konstruktor: class A$T$Op$
+ konstruktor: class A$O$11$
+ konstruktor: class A$$anonfun$1$O$13$
+ konstruktor: class A$$anon$1$O$
+ konstruktor: class A$$anon$1$Op$
+ konstruktor: class T$O$
+ konstruktor: class T$Op$
+ konstruktor: class T$N$O$
+ konstruktor: class T$N$Op$
+ konstruktor: class T$A$O$
+ konstruktor: class T$A$Op$
+ konstruktor: class T$T$O$
+ konstruktor: class T$T$Op$
+ konstruktor: class T$O$14$
+ konstruktor: class T$$anonfun$2$O$16$
+ konstruktor: class T$$anon$2$O$
+ konstruktor: class T$$anon$2$Op$
+no object konstruktors called when serializing / deserializing objects (starting at the outer or the object itself)
+deserializing outer objects with non-initialized inners again
+accessing modules triggers initialization
+ konstruktor: class A$O$
+ konstruktor: class A$Op$
+ konstruktor: class A$N$O$
+ konstruktor: class A$N$Op$
+deserializing creates a new object graph, including new scala 'object' instances, no matter where serialization starts
+init static module M and field v
+ konstruktor: class M$
+ konstruktor: class M$O$18$
+serDeser does not initialize nested static modules
+init M.O
+ konstruktor: class M$O$
+serDeser nested static module
+objects declared in field decls are not static modules, so they deserialize to new instances
+init lazy val M.w
+objects declared in lazy val are not static modules either
+ konstruktor: class M$O$19$
+object declared in a function: new instance created on each invocation
+ konstruktor: class M$$anonfun$3$O$20$
+ konstruktor: class M$$anonfun$3$O$20$