File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1292,11 +1292,11 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
1292
1292
def followAlias (tp : Type )(implicit ctx : Context ): Type = {
1293
1293
val constraint = ctx.typerState.constraint
1294
1294
def inst (tp : Type ): Type = tp match {
1295
- case TypeBounds (lo, hi) =>
1296
- if ((lo eq hi) || (hi <:< lo)(ctx.fresh.setExploreTyperState)) inst(lo) else NoType
1295
+ case TypeBounds (lo, hi)
1296
+ if (lo eq hi) || (hi <:< lo)(ctx.fresh.setExploreTyperState) =>
1297
+ inst(lo)
1297
1298
case tp : PolyParam =>
1298
- var tvar1 = constraint.typeVarOfParam(tp)
1299
- if (tvar1.exists) tvar1 else tp
1299
+ constraint.typeVarOfParam(tp).orElse(tp)
1300
1300
case _ => tp
1301
1301
}
1302
1302
tp match {
You can’t perform that action at this time.
0 commit comments