aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
index 79408ddde..1d23a902a 100644
--- a/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
+++ b/compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
@@ -14,6 +14,7 @@ import scala.annotation.{tailrec, switch}
import scala.collection.mutable.ListBuffer
import scala.collection.{ mutable, immutable }
import config.Printers.pickling
+import typer.Checking
/** Unpickler for typed trees
* @param reader the reader from which to unpickle
@@ -732,6 +733,12 @@ class TreeUnpickler(reader: TastyReader, tastyName: TastyName.Table, posUnpickle
// no longer necessary.
goto(end)
setPos(start, tree)
+
+ // This is also done in PostTyper but needs to be redone here
+ if (!sym.is(SyntheticOrPrivate) && sym.owner.isClass) {
+ sym.info = Checking.checkNoPrivateLeaks(sym, tree.pos)
+ }
+ tree
}
private def readTemplate(implicit ctx: Context): Template = {