Skip to content

Commit dadbd6e

Browse files
committed
Revert "Avoid round-trip through sourceModule in scalacLinkedClass."
This reverts commit e88c5b7. Fixes scala#9916
1 parent b22331e commit dadbd6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

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

11771177
final def scalacLinkedClass(using Context): Symbol =
11781178
if (this.is(ModuleClass)) companionNamed(effectiveName.toTypeName)
1179-
else if (this.isClass) companionNamed(effectiveName.moduleClassName)
1179+
else if (this.isClass) companionNamed(effectiveName.moduleClassName).sourceModule.moduleClass
11801180
else NoSymbol
11811181

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

0 commit comments

Comments
 (0)