diff options
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala b/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala index 5c07b7bcf..53ce5555b 100644 --- a/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala +++ b/compiler/src/dotty/tools/dotc/typer/TypeAssigner.scala @@ -132,6 +132,11 @@ trait TypeAssigner { def avoidingType(expr: Tree, bindings: List[Tree])(implicit ctx: Context): Type = avoid(expr.tpe, localSyms(bindings).filter(_.isTerm)) + def avoidPrivateLeaks(sym: Symbol, pos: Position)(implicit ctx: Context): Type = + if (!sym.is(SyntheticOrPrivate) && sym.owner.isClass) + Checking.checkNoPrivateLeaks(sym, pos) + else sym.info + def seqToRepeated(tree: Tree)(implicit ctx: Context): Tree = Typed(tree, TypeTree(tree.tpe.widen.translateParameterized(defn.SeqClass, defn.RepeatedParamClass))) |