Skip to content

Commit e984e23

Browse files
committed
Cleanups
1 parent 1e9ffd4 commit e984e23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,11 +1292,11 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
12921292
def followAlias(tp: Type)(implicit ctx: Context): Type = {
12931293
val constraint = ctx.typerState.constraint
12941294
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)
12971298
case tp: PolyParam =>
1298-
var tvar1 = constraint.typeVarOfParam(tp)
1299-
if (tvar1.exists) tvar1 else tp
1299+
constraint.typeVarOfParam(tp).orElse(tp)
13001300
case _ => tp
13011301
}
13021302
tp match {

0 commit comments

Comments
 (0)