We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e028af commit 33094bfCopy full SHA for 33094bf
compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala
@@ -144,8 +144,9 @@ object TypeTestsCasts {
144
// See TypeComparer#either
145
recur(tp1, P) && recur(tp2, P)
146
case _ =>
147
- // first try without striping type parameters for performance
+ // always false test warnings are emitted elsewhere
148
X.classSymbol.exists && P.classSymbol.exists && !X.classSymbol.asClass.mayHaveCommonChild(P.classSymbol.asClass) ||
149
+ // first try without striping type parameters for performance
150
isClassDetermined(X, tpe)(ctx.fresh.setNewTyperState().setFreshGADTBounds) ||
151
isClassDetermined(stripTypeParam(X), tpe)(ctx.fresh.setNewTyperState().setFreshGADTBounds)
152
}
0 commit comments