Skip to content

Commit 4498b8b

Browse files
committed
Disable checkNoPrivateLeaks when unpickling
1 parent a7c6ff7 commit 4498b8b

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -783,9 +783,6 @@ class TreeUnpickler(reader: TastyReader,
783783
// no longer necessary.
784784
goto(end)
785785
setPos(start, tree)
786-
if (!sym.isType) { // Only terms might have leaky aliases, see the documentation of `checkNoPrivateLeaks`
787-
sym.info = ta.avoidPrivateLeaks(sym, tree.pos)
788-
}
789786
if ((sym.isClass || sym.is(CaseVal)) && sym.isLocal)
790787
// Child annotations for local classes and enum values are not pickled, so
791788
// need to be re-established here.

compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,6 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
567567
// we need the checkNonCyclic call to insert LazyRefs for F-bounded cycles
568568
else if (!denot.is(Param)) tp1.underlyingIfRepeated(isJava = false)
569569
else tp1
570-
571-
if (!denot.isType) { // Only terms might have leaky aliases, see the documentation of `checkNoPrivateLeaks`
572-
val sym = denot.symbol
573-
denot.info = ctx.typeAssigner.avoidPrivateLeaks(sym, sym.pos)
574-
}
575-
576570
if (denot.isConstructor) addConstructorTypeParams(denot)
577571
if (atEnd) {
578572
assert(!denot.isSuperAccessor, denot)

0 commit comments

Comments
 (0)