summaryrefslogtreecommitdiff
path: root/test/files/run/t6608.check
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-03-11 18:35:28 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-03-11 20:03:11 +0100
commit34faa0d073a8613deebffe7605fd8a5e9a93afbc (patch)
tree03a178e79a764f3b56459f008b8bf00f813541ec /test/files/run/t6608.check
parent1b6297f642877dcc7edcd704a5d3cf99a12e54b8 (diff)
downloadscala-34faa0d073a8613deebffe7605fd8a5e9a93afbc.tar.gz
scala-34faa0d073a8613deebffe7605fd8a5e9a93afbc.tar.bz2
scala-34faa0d073a8613deebffe7605fd8a5e9a93afbc.zip
SI-6601 Close access loophole for value class constructors
ExtensionMethods marks private constructors of value classes as notPRIVATE before pickling. When the pickler reads the flags of this symbol, the anti-shift mechanism folds this into the regular PRIVATE flag, so the class is pickled as though it was public all along. A seprately compiled client can then call this constructor. To remedy this, we must: - pickle `rawFlags`, rather than `flags`. This is symmetric with unpickling, which sets `rawFlags` with the value it reads. - Add `notPRIVATE` to the flagset `PickledFlags`. We cannot make this change in a minor version, as the pickler and unpickler must agree on `PickledFlags`. I believe that this won't change the size of pickled flags for the majority of symbols (ie, those without the notPRIVATE flag) due to the variable length encoding in `writeLongNat`. This also improves the situation for SI-6608. Reflection and scalap (and, by extension, IntelliJ), no longer will see as public methods that have had their access widened in SuperAccessors (which is done selectively to support inlining under separate compilation.)
Diffstat (limited to 'test/files/run/t6608.check')
-rw-r--r--test/files/run/t6608.check1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/files/run/t6608.check b/test/files/run/t6608.check
new file mode 100644
index 0000000000..15628b322e
--- /dev/null
+++ b/test/files/run/t6608.check
@@ -0,0 +1 @@
+(C$$yyy,true)