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 b8098ce commit 5344b06Copy full SHA for 5344b06
compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala
@@ -186,12 +186,12 @@ object TypeTestsCasts {
186
if res1.isEmpty && res2.isEmpty then res1
187
else if res2.isEmpty then
188
if isCheckDefinitelyFalse(tp1, P) then res2
189
- else i"it cannot be checked against the type $tp1"
+ else res1
190
else if res1.isEmpty then
191
if isCheckDefinitelyFalse(tp2, P) then res1
192
- else i"it cannot be checked against the type $tp2"
+ else res2
193
else
194
- i"it cannot be checked against the type $tp2"
+ res1
195
196
case _ =>
197
// always false test warnings are emitted elsewhere
0 commit comments