diff options
author | Martin Odersky <odersky@gmail.com> | 2014-08-19 15:30:04 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-08-19 15:32:20 +0200 |
commit | 65aa10526340bc618bdba71a4cd5616e8a185715 (patch) | |
tree | ddeb6b78652901f6fd9326b8553130b01b0e4fa5 /src/dotty/tools/dotc/core/SymDenotations.scala | |
parent | 5b941d2be550540e1bf2df78edfdbca35aaf8e68 (diff) | |
download | dotty-65aa10526340bc618bdba71a4cd5616e8a185715.tar.gz dotty-65aa10526340bc618bdba71a4cd5616e8a185715.tar.bz2 dotty-65aa10526340bc618bdba71a4cd5616e8a185715.zip |
Make-not private
Refchecks now makes all members not-private that need it. This is done by
setting flag NotJavaPrivate. No name change is involved.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index bd269bbcc..310dde912 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -805,7 +805,7 @@ object SymDenotations { */ final def accessBoundary(base: Symbol)(implicit ctx: Context): Symbol = { val fs = flags - if (fs is Private) owner + if (fs is (Private, butNot = NotJavaPrivate)) owner else if (fs is StaticProtected) defn.RootClass else if (privateWithin.exists && !ctx.phase.erasedTypes) privateWithin else if (fs is Protected) base @@ -890,22 +890,6 @@ object SymDenotations { /** Install this denotation as the result of the given denotation transformer. */ override def installAfter(phase: DenotTransformer)(implicit ctx: Context): Unit = super.installAfter(phase) - - /** Remove private modifier from symbol's definition. If this symbol - * is not a constructor nor a static module, rename it by expanding its name to avoid name clashes - * @param base the fully qualified name of this class will be appended if name expansion is needed - */ - final def makeNotPrivateAfter(base: Symbol, phase: DenotTransformer)(implicit ctx: Context): Unit = { - if (this.is(Private)) { - val newName = - if (this.is(Module) && isStatic || isClassConstructor) name - else { - if (this.is(Module)) moduleClass.makeNotPrivateAfter(base, phase) - name.expandedName(base) - } - copySymDenotation(name = newName, initFlags = flags &~ Private).installAfter(phase) - } - } } /** The contents of a class definition during a period |