Skip to content

Commit 2e336b0

Browse files
committed
Fix cache invalidation of packageObjs
1 parent e5b3023 commit 2e336b0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2178,17 +2178,17 @@ object SymDenotations {
21782178
recur(packageObjs, super.memberNames(keepOnly))
21792179
}
21802180

2181-
/** If another symbol with the same name is entered, unlink it,
2182-
* and, if symbol is a package object, invalidate the packageObj cache.
2181+
/** If another symbol with the same name is entered, unlink it.
2182+
* If symbol is a package object, invalidate the packageObj cache.
21832183
* @return `sym` is not already entered
21842184
*/
21852185
override def proceedWithEnter(sym: Symbol, mscope: MutableScope)(implicit ctx: Context): Boolean = {
21862186
val entry = mscope.lookupEntry(sym.name)
21872187
if (entry != null) {
21882188
if (entry.sym == sym) return false
21892189
mscope.unlink(entry)
2190-
if (sym.name.isPackageObjectName) packageObjsRunId = NoRunId
21912190
}
2191+
if (sym.name.isPackageObjectName) packageObjsRunId = NoRunId
21922192
true
21932193
}
21942194

0 commit comments

Comments
 (0)