File tree 1 file changed +8
-5
lines changed
src/dotty/tools/dotc/core 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,13 @@ object SymDenotations {
286
286
287
287
// ------ Names ----------------------------------------------
288
288
289
+ /** The expanded name of this denotation. */
290
+ final def expandedName (implicit ctx : Context ) =
291
+ if (is(ExpandedName ) || isConstructor) name
292
+ else name.expandedName(initial.asSymDenotation.owner)
293
+ // need to use initial owner to disambiguate, as multiple private symbols with the same name
294
+ // might have been moved from different origins into the same class
295
+
289
296
/** The name with which the denoting symbol was created */
290
297
final def originalName (implicit ctx : Context ) = {
291
298
val d = initial.asSymDenotation
@@ -1081,11 +1088,7 @@ object SymDenotations {
1081
1088
def ensureNotPrivate (implicit ctx : Context ) =
1082
1089
if (is(Private ))
1083
1090
copySymDenotation(
1084
- name =
1085
- if (is(ExpandedName ) || isConstructor) this .name
1086
- else this .name.expandedName(initial.asSymDenotation.owner),
1087
- // need to use initial owner to disambiguate, as multiple private symbols with the same name
1088
- // might have been moved from different origins into the same class
1091
+ name = expandedName,
1089
1092
initFlags = this .flags &~ Private | ExpandedName )
1090
1093
else this
1091
1094
}
You can’t perform that action at this time.
0 commit comments