File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
scaladoc/src/dotty/tools/scaladoc/tasty Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,18 @@ object NameNormalizer {
1818 escaped
1919 }
2020
21- def normalizedFullName : String = {
22- import reflect .*
23- val fullName = s.fullName
24- val withoutObjectSuffix = if s.flags.is(Flags .Module ) then fullName.stripSuffix(" $" ) else fullName
25- val escaped = escapedName(withoutObjectSuffix)
26- escaped
27- }
21+ def ownerNameChain : List [String ] = {
22+ import reflect .*
23+ s match
24+ case s : reflect.Symbol if s.isNoSymbol => List .empty
25+ case s : reflect.Symbol if s == defn.EmptyPackageClass => List .empty
26+ case s : reflect.Symbol if s == defn.RootPackage => List .empty
27+ case s : reflect.Symbol if s == defn.RootClass => List .empty
28+ case _ => s.owner.ownerNameChain :+ s.normalizedName
29+ }
30+
31+ def normalizedFullName : String =
32+ s.ownerNameChain.mkString(" ." )
2833
2934 private val ignoredKeywords : Set [String ] = Set (" this" )
3035
You can’t perform that action at this time.
0 commit comments