File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1050,10 +1050,15 @@ object SymDenotations {
1050
1050
override def transformAfter (phase : DenotTransformer , f : SymDenotation => SymDenotation )(implicit ctx : Context ): Unit =
1051
1051
super .transformAfter(phase, f)
1052
1052
1053
+ /** If denotation is private, remove the Private flag and expand the name if necessary */
1053
1054
def ensureNotPrivate (implicit ctx : Context ) =
1054
1055
if (is(Private ))
1055
1056
copySymDenotation(
1056
- name = if (is(ExpandedName ) || isConstructor) this .name else this .name.expandedName(owner),
1057
+ name =
1058
+ if (is(ExpandedName ) || isConstructor) this .name
1059
+ else this .name.expandedName(initial.asSymDenotation.owner),
1060
+ // need to use initial owner to disambiguate, as multiple private symbols with the same name
1061
+ // might have been moved from different origins into the same class
1057
1062
initFlags = this .flags &~ Private | ExpandedName )
1058
1063
else this
1059
1064
}
You can’t perform that action at this time.
0 commit comments