@@ -214,7 +214,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
214214 /** A path referencing the companion of class type `clsType` */
215215 private def companionPath (clsType : Type , span : Span )(using Context ) =
216216 val ref = pathFor(clsType.companionRef)
217- assert(ref.symbol.is(Module ) && (clsType.classSymbol.is(ModuleClass ) || (ref.symbol.companionClass == clsType.classSymbol)))
217+ assert(ref.symbol.is(Module ) && (clsType.widen. classSymbol.is(ModuleClass ) || (ref.symbol.companionClass == clsType.widen .classSymbol)))
218218 ref.withSpan(span)
219219
220220 private def checkFormal (formal : Type )(using Context ): Boolean =
@@ -240,15 +240,15 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
240240 if mirroredType.termSymbol.is(CaseVal ) then
241241 val module = mirroredType.termSymbol
242242 val modulePath = pathFor(mirroredType).withSpan(span)
243- if module.info.classSymbol.is(Scala2x ) then
243+ if module.info.widen. classSymbol.is(Scala2x ) then
244244 val mirrorType = mirrorCore(defn.Mirror_SingletonProxyClass , mirroredType, mirroredType, module.name, formal)
245245 val mirrorRef = New (defn.Mirror_SingletonProxyClass .typeRef, modulePath :: Nil )
246246 mirrorRef.cast(mirrorType)
247247 else
248248 val mirrorType = mirrorCore(defn.Mirror_SingletonClass , mirroredType, mirroredType, module.name, formal)
249249 modulePath.cast(mirrorType)
250- else if mirroredType.classSymbol.isGenericProduct then
251- val cls = mirroredType.classSymbol
250+ else if mirroredType.widen. classSymbol.isGenericProduct then
251+ val cls = mirroredType.widen. classSymbol
252252 val accessors = cls.caseAccessors.filterNot(_.isAllOf(PrivateLocal ))
253253 val elemLabels = accessors.map(acc => ConstantType (Constant (acc.name.toString)))
254254 val (monoType, elemsType) = mirroredType match
@@ -278,8 +278,8 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
278278 end productMirror
279279
280280 private def sumMirror (mirroredType : Type , formal : Type , span : Span )(using Context ): Tree =
281- if mirroredType.classSymbol.isGenericSum then
282- val cls = mirroredType.classSymbol
281+ if mirroredType.widen. classSymbol.isGenericSum then
282+ val cls = mirroredType.widen. classSymbol
283283 val elemLabels = cls.children.map(c => ConstantType (Constant (c.name.toString)))
284284
285285 def solve (sym : Symbol ): Type = sym match
@@ -365,7 +365,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
365365 formal.member(tpnme.MirroredType ).info match
366366 case TypeBounds (mirroredType, _) =>
367367 if mirroredType.termSymbol.is(CaseVal )
368- || mirroredType.classSymbol.isGenericProduct
368+ || mirroredType.widen. classSymbol.isGenericProduct
369369 then
370370 synthesizedProductMirror(formal, span)
371371 else
0 commit comments