@@ -311,7 +311,7 @@ object RefChecks {
311311 if (subOther(member.owner) && deferredCheck)
312312 // Console.println(infoString(member) + " shadows1 " + infoString(other) " in " + clazz);//DEBUG
313313 return
314- val parentSymbols = clazz.info.parents.map(_.typeSymbol)
314+ val parentSymbols = clazz.info.parents.map(_.widen. typeSymbol)
315315 if (parentSymbols exists (p => subOther(p) && subMember(p) && deferredCheck))
316316 // Console.println(infoString(member) + " shadows2 " + infoString(other) + " in " + clazz);//DEBUG
317317 return
@@ -574,8 +574,8 @@ object RefChecks {
574574 mismatches match {
575575 // Only one mismatched parameter: say something useful.
576576 case (pa, pc) :: Nil =>
577- val abstractSym = pa.typeSymbol
578- val concreteSym = pc.typeSymbol
577+ val abstractSym = pa.widen. typeSymbol
578+ val concreteSym = pc.widen. typeSymbol
579579 def subclassMsg (c1 : Symbol , c2 : Symbol ) =
580580 s " : ${c1.showLocated} is a subclass of ${c2.showLocated}, but method parameter types must match exactly. "
581581 val addendum =
@@ -1129,7 +1129,7 @@ class RefChecks extends MiniPhase { thisPhase =>
11291129
11301130 override def transformNew (tree : New )(using Context ): New = {
11311131 val tpe = tree.tpe
1132- val sym = tpe.typeSymbol
1132+ val sym = tpe.widen. typeSymbol
11331133 checkUndesiredProperties(sym, tree.srcPos)
11341134 currentLevel.enterReference(sym, tree.span)
11351135 tpe.dealias.foreachPart {
0 commit comments