From 1dee5b6341a7986c298f1251257f629bd4340067 Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Fri, 18 Nov 2016 00:17:49 +0100 Subject: checkNoPrivateLeaks is now also done in TreeUnpickler This could be abstracted better but we'll end up replacing checkNoPrivateLeaks soon anyway due to https://github.com/lampepfl/dotty/issues/1723 --- compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala') 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 = { -- cgit v1.2.3