Skip to content

Commit 33094bf

Browse files
committed
Address review: add comment
1 parent 2e028af commit 33094bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,9 @@ object TypeTestsCasts {
144144
// See TypeComparer#either
145145
recur(tp1, P) && recur(tp2, P)
146146
case _ =>
147-
// first try without striping type parameters for performance
147+
// always false test warnings are emitted elsewhere
148148
X.classSymbol.exists && P.classSymbol.exists && !X.classSymbol.asClass.mayHaveCommonChild(P.classSymbol.asClass) ||
149+
// first try without striping type parameters for performance
149150
isClassDetermined(X, tpe)(ctx.fresh.setNewTyperState().setFreshGADTBounds) ||
150151
isClassDetermined(stripTypeParam(X), tpe)(ctx.fresh.setNewTyperState().setFreshGADTBounds)
151152
}

0 commit comments

Comments
 (0)