Skip to content

Commit d3501e1

Browse files
committed
Fix NameKinds
The previous change hid the refinements of `info` and apply/unapply. Turning SimpleNameKind and SignedNameKind back into objects fixes that. Neither name kind installs anything as a side effect so turning them into objects is OK.
1 parent 6e3f325 commit d3501e1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

compiler/src/dotty/tools/dotc/core/NameKinds.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ object NameKinds {
6161
def infoString: String
6262
}
6363

64-
/** The kind of SimpleNames */
65-
val SimpleNameKind = new NameKind(UTF8) { self =>
64+
object SimpleNameKind extends NameKind(UTF8) { self =>
6665
type ThisInfo = Info
6766
val info = new Info
6867
def mkString(underlying: TermName, info: ThisInfo) = unsupported("mkString")
@@ -359,7 +358,7 @@ object NameKinds {
359358
val ModuleClassName = new SuffixNameKind(OBJECTCLASS, "$", optInfoString = "ModuleClass")
360359

361360
/** A name together with a signature. Used in Tasty trees. */
362-
val SignedName = new NameKind(63) {
361+
object SignedName extends NameKind(63) {
363362

364363
case class SignedInfo(sig: Signature) extends Info {
365364
override def toString = s"$infoString $sig"

0 commit comments

Comments
 (0)