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 9452437 commit e8b7038Copy full SHA for e8b7038
compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala
@@ -132,7 +132,7 @@ object TypeTestsCasts {
132
recur(tp1, P) && recur(tp2, P)
133
case _ =>
134
// first try withou striping type parameters for performance
135
- !X.classSymbol.asClass.mayHaveCommonChild(P.classSymbol.asClass) ||
+ X.classSymbol.exists && P.classSymbol.exists && !X.classSymbol.asClass.mayHaveCommonChild(P.classSymbol.asClass) ||
136
isClassDetermined(X, tpe)(ctx.fresh.setNewTyperState()) ||
137
isClassDetermined(stripTypeParam(X), tpe)(ctx.fresh.setNewTyperState())
138
}
0 commit comments