Skip to content

Commit bded3aa

Browse files
committed
Workaround last issues with -Ytest-pickler
We run checkNoPrivateLeaks in the unpickler since last commit and this is causing new issues related to privacy leaks. Give up and workaround them since we're going to redesign how we handle privacy leaks because of #1723 anyway.
1 parent 9f6d8b2 commit bded3aa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ object Symbols {
574574
/** Copy a symbol, overriding selective fields */
575575
def copy(
576576
owner: Symbol = sym.owner,
577-
name: N = sym.name,
577+
name: N = (sym.name: N), // Dotty deviation: type ascription to avoid leaking private sym (only happens in unpickling), won't be needed once #1723 is fixed
578578
flags: FlagSet = sym.flags,
579579
info: Type = sym.info,
580580
privateWithin: Symbol = sym.privateWithin,

compiler/src/dotty/tools/dotc/core/tasty/TreeBuffer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TreeBuffer extends TastyBuffer(50000) {
2525
*/
2626
private val treeAddrs = new java.util.IdentityHashMap[Tree, TreeAddrs]
2727

28-
def registerTreeAddr(tree: Tree) =
28+
def registerTreeAddr(tree: Tree): Unit =
2929
treeAddrs.put(tree,
3030
treeAddrs.get(tree) match {
3131
case null => currentAddr

0 commit comments

Comments
 (0)