Skip to content

Commit 21bc82f

Browse files
committed
Adapt isPackageObject to semantic naming
Used a hardcoded string before, which caused test failures.
1 parent 1058278 commit 21bc82f

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

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

-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ object StdNames {
135135
val OPS_PACKAGE: N = "<special-ops>"
136136
val OVERLOADED: N = "<overloaded>"
137137
val PACKAGE: N = "package"
138-
val PACKAGE_CLS: N = "package$"
139138
val ROOT: N = "<root>"
140139
val SPECIALIZED_SUFFIX: N = "$sp"
141140
val SUPER_PREFIX: N = "super$"

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ object SymDenotations {
513513

514514
/** Is this symbol a package object or its module class? */
515515
def isPackageObject(implicit ctx: Context): Boolean = {
516-
val poName = if (isType) nme.PACKAGE_CLS else nme.PACKAGE
516+
val poName = if (isType) nme.PACKAGE.moduleClassName else nme.PACKAGE
517517
(name.toTermName == poName) && (owner is Package) && (this is Module)
518518
}
519519

0 commit comments

Comments
 (0)