Skip to content

Commit 5f158c5

Browse files
committed
Fix #9525: revert changes
Revert changes in e88c5b7
1 parent 76903e6 commit 5f158c5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ object SymDenotations {
11571157

11581158
final def scalacLinkedClass(using Context): Symbol =
11591159
if (this.is(ModuleClass)) companionNamed(effectiveName.toTypeName)
1160-
else if (this.isClass) companionNamed(effectiveName.moduleClassName)
1160+
else if (this.isClass) companionNamed(effectiveName.moduleClassName).sourceModule.moduleClass
11611161
else NoSymbol
11621162

11631163
/** Find companion class symbol with given name, or NoSymbol if none exists.

compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
133133
import Scala2Unpickler._
134134

135135
val moduleRoot: SymDenotation = inContext(ictx) { moduleClassRoot.sourceModule.denot }
136-
assert(moduleRoot.isTerm)
136+
assert(moduleRoot.isTerm, "moduleRoot = " + moduleRoot + ", classRoot = " + classRoot + ", moduleClassRoot = " + moduleClassRoot)
137137

138138
checkVersion(using ictx)
139139

0 commit comments

Comments
 (0)