summaryrefslogtreecommitdiff
path: root/test/files/neg/t6601
Commit message (Collapse)AuthorAgeFilesLines
* SI-6601 Close access loophole for value class constructorsJason Zaugg2013-03-112-0/+4
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.)