aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Namer.scala
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Namer.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Namer.scala9
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Namer.scala b/compiler/src/dotty/tools/dotc/typer/Namer.scala
index 068ef3e4b..6bd8f6d06 100644
--- a/compiler/src/dotty/tools/dotc/typer/Namer.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Namer.scala
@@ -668,13 +668,15 @@ class Namer { typer: Typer =>
* to pick up the context at the point where the completer was created.
*/
def completeInCreationContext(denot: SymDenotation): Unit = {
+ val sym = denot.symbol
original match {
- case original: MemberDef => addAnnotations(denot.symbol, original)
+ case original: MemberDef => addAnnotations(sym, original)
case _ =>
}
addInlineInfo(denot)
- denot.info = typeSig(denot.symbol)
- Checking.checkWellFormed(denot.symbol)
+ denot.info = typeSig(sym)
+ Checking.checkWellFormed(sym)
+ denot.info = avoidPrivateLeaks(sym, sym.pos)
}
}
@@ -854,6 +856,7 @@ class Namer { typer: Typer =>
if (isDerivedValueClass(cls)) cls.setFlag(Final)
cls.setApplicableFlags(
(NoInitsInterface /: impl.body)((fs, stat) => fs & defKind(stat)))
+ cls.info = avoidPrivateLeaks(cls, cls.pos)
}
}