aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index 31f6745ef..9b9283464 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -1049,6 +1049,13 @@ object SymDenotations {
*/
override def transformAfter(phase: DenotTransformer, f: SymDenotation => SymDenotation)(implicit ctx: Context): Unit =
super.transformAfter(phase, f)
+
+ def ensureNotPrivate(implicit ctx: Context) =
+ if (is(Private))
+ copySymDenotation(
+ name = if (is(ExpandedName) || isConstructor) this.name else this.name.expandedName(owner),
+ initFlags = this.flags &~ Private | ExpandedName)
+ else this
}
/** The contents of a class definition during a period