File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -489,13 +489,9 @@ object SymDenotations {
489489 def expand (name : Name ): Name = name.replace {
490490 case name : SimpleName => qualify(name)
491491 case name @ DerivedName (qual, info : QualifiedInfo ) =>
492- if kind == TraitSetterName then
493- qualify(name.toSimpleName)
494- // TODO: Find out why TraitSetterNames can't be kept as QualifiedNames
495- else
496- expand(qual).derived(info)
497- // In all other cases, keep the qualified name, so that it can be recovered later.
498- // An example where this matters is run/i15702.scala
492+ expand(qual).derived(info)
493+ // Keep the qualified name, so that it can be recovered later.
494+ // An example where this matters is run/i15702.scala
499495 }
500496 val fn = expand(name)
501497 if (name.isTypeName) fn.toTypeName else fn.toTermName
Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ object Mixin {
2323 val description : String = " expand trait fields and trait initializers"
2424
2525 def traitSetterName (getter : TermSymbol )(using Context ): TermName =
26+ extension (name : Name ) def qualifiedToSimple = name.replace {
27+ case n @ AnyQualifiedName (_, _) => n.toSimpleName
28+ }
2629 getter.ensureNotPrivate.name
30+ .qualifiedToSimple // TODO: Find out why TraitSetterNames can't be defined over QualifiedNames
2731 .expandedName(getter.owner, TraitSetterName )
2832 .asTermName.syntheticSetterName
2933}
You can’t perform that action at this time.
0 commit comments