Skip to content

Commit bdd1499

Browse files
committed
Change of how to correct the Issue
- Add a new method "normalizedFullName" - Call the method "ClassLikeSupport"
1 parent c40a07a commit bdd1499

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/ClassLikeSupport.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ trait ClassLikeSupport:
525525
experimental: Option[Annotation] = None
526526
) = Member(
527527
name = symbol.normalizedName,
528-
fullName = if symbol.fullName endsWith "$" then symbol.fullName.dropRight(1) else symbol.fullName,
528+
fullName = symbol.normalizedFullName,
529529
dri = symbol.dri,
530530
kind = kind,
531531
visibility = symbol.getVisibility(),

scaladoc/src/dotty/tools/scaladoc/tasty/NameNormalizer.scala

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@ object NameNormalizer {
1414
import reflect.*
1515
val withoutObjectSuffix = if s.flags.is(Flags.Module) then s.name.stripSuffix("$") else s.name
1616
val constructorNormalizedName = if s.isClassConstructor then "this" else withoutObjectSuffix
17-
val escaped = escapedName(constructorNormalizedName)
17+
val escaped = escapedName(withoutObjectSuffix)
18+
escaped
19+
}
20+
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)
1826
escaped
1927
}
2028

0 commit comments

Comments
 (0)