File tree 1 file changed +9
-9
lines changed
compiler/src/dotty/tools/dotc/core
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -2312,18 +2312,18 @@ class TrackingTypeComparer(initctx: Context) extends TypeComparer(initctx) {
2312
2312
case _ =>
2313
2313
cas
2314
2314
}
2315
- def widenAbstractTypes (tp : Type ): Type = new TypeMap {
2316
- def apply (tp : Type ) = tp match {
2315
+ def widenAbstractTypes (tp : Type ) = new TypeMap {
2316
+ def apply (tp : Type ): Type = tp match {
2317
2317
case tp : TypeRef =>
2318
- if (tp.symbol.isAbstractOrParamType | tp.symbol.isOpaqueAlias)
2319
- WildcardType
2320
- else tp.info match {
2321
- case TypeAlias (alias) =>
2322
- val alias1 = widenAbstractTypes(alias)
2323
- if (alias1 ne alias) alias1 else tp
2318
+ tp.info match {
2319
+ case TypeBounds (lo, hi) =>
2320
+ if (hi frozen_<:< lo) {
2321
+ val alias = apply(lo)
2322
+ if (alias ne lo) alias else mapOver(tp)
2323
+ }
2324
+ else WildcardType
2324
2325
case _ => mapOver(tp)
2325
2326
}
2326
-
2327
2327
case tp : TypeVar if ! tp.isInstantiated => WildcardType
2328
2328
case _ : TypeParamRef => WildcardType
2329
2329
case _ => mapOver(tp)
You can’t perform that action at this time.
0 commit comments