diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-11-18 00:17:49 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-11-22 01:35:08 +0100 |
commit | 1dee5b6341a7986c298f1251257f629bd4340067 (patch) | |
tree | 446bfccdb665c7f13b98b79f11e80669f9e83e02 /compiler/src/dotty/tools/dotc/core | |
parent | d3a4916b4f04e89a6fd850206f92bbffa8cce14e (diff) | |
download | dotty-1dee5b6341a7986c298f1251257f629bd4340067.tar.gz dotty-1dee5b6341a7986c298f1251257f629bd4340067.tar.bz2 dotty-1dee5b6341a7986c298f1251257f629bd4340067.zip |
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
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala | 7 |
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 = { |