We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f00fa72 commit 81ac68fCopy full SHA for 81ac68f
compiler/src/dotty/tools/dotc/typer/Implicits.scala
@@ -909,7 +909,7 @@ trait Implicits { self: Typer =>
909
/** A path referencing the companion of class type `clsType` */
910
private def companionPath(clsType: Type, span: Span)(implicit ctx: Context) = {
911
val ref = pathFor(clsType.companionRef)
912
- assert(ref.symbol.is(Module) && ref.symbol.companionClass == clsType.classSymbol)
+ assert(ref.symbol.is(Module) && (clsType.classSymbol.is(ModuleClass) || (ref.symbol.companionClass == clsType.classSymbol)))
913
ref.withSpan(span)
914
}
915
0 commit comments