Skip to content

Supress safe-init warnings for NameKind HashMaps #14918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions compiler/src/dotty/tools/dotc/core/NameKinds.scala
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ object NameKinds {
case _ => None
}

simpleNameKinds(tag) = this
simpleNameKinds(tag) = (this: @unchecked)
}

/** The kind of names that get formed by adding a prefix to an underlying name */
Expand Down Expand Up @@ -152,7 +152,7 @@ object NameKinds {

def infoString: String = s"Qualified $separator"

qualifiedNameKinds(tag) = this
qualifiedNameKinds(tag) = (this: @unchecked)
}

/** An extractor for qualified names of an arbitrary kind */
Expand Down Expand Up @@ -190,7 +190,7 @@ object NameKinds {
else -1
}

numberedNameKinds(tag) = this
numberedNameKinds(tag) = (this: @unchecked)
}

/** An extractor for numbered names of arbitrary kind */
Expand Down Expand Up @@ -225,7 +225,7 @@ object NameKinds {
def fresh(prefix: TypeName)(using Context): TypeName =
fresh(prefix.toTermName).toTypeName

uniqueNameKinds(separator) = this
uniqueNameKinds(separator) = (this: @unchecked)
}

/** An extractor for unique names of arbitrary kind */
Expand Down