Skip to content

Commit

Permalink
Change of how to correct the Issue
Browse files Browse the repository at this point in the history
- Add a new method "normalizedFullName"
- Call the method "ClassLikeSupport"
  • Loading branch information
Dedelweiss committed Apr 20, 2023
1 parent c40a07a commit 8263956
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ trait ClassLikeSupport:
experimental: Option[Annotation] = None
) = Member(
name = symbol.normalizedName,
fullName = if symbol.fullName endsWith "$" then symbol.fullName.dropRight(1) else symbol.fullName,
fullName = symbol.normalizedFullName,
dri = symbol.dri,
kind = kind,
visibility = symbol.getVisibility(),
Expand Down
8 changes: 8 additions & 0 deletions scaladoc/src/dotty/tools/scaladoc/tasty/NameNormalizer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ object NameNormalizer {
val escaped = escapedName(constructorNormalizedName)
escaped
}

def normalizedFullName: String = {
import reflect.*
val fullName = s.fullName
val withoutObjectSuffix = if s.flags.is(Flags.Module) then fullName.stripSuffix("$") else fullName
val escaped = escapedName(withoutObjectSuffix)
escaped
}

private val ignoredKeywords: Set[String] = Set("this")

Expand Down

0 comments on commit 8263956

Please sign in to comment.