[FIR] Check is for impossibility
^KT-58203 Fixed ^KT-62646
This commit is contained in:
committed by
Space Team
parent
92d8da621e
commit
88ff93df7f
+1
-1
@@ -13,7 +13,7 @@ fun test1(x: String?): Int? {
|
||||
@OptIn(ExperimentalContracts::class)
|
||||
fun test2(x: String?): Int? {
|
||||
<!WRONG_IMPLIES_CONDITION!>contract {
|
||||
returnsNotNull() implies (x is Boolean)
|
||||
returnsNotNull() implies (<!USELESS_IS_CHECK!>x is Boolean<!>)
|
||||
}<!>
|
||||
|
||||
return x?.length
|
||||
|
||||
Vendored
+1
-1
@@ -20,7 +20,7 @@ fun <T> deserializeAndLoadState(
|
||||
) {}
|
||||
|
||||
fun use(beforeRunTask: BeforeRunTask<*>) {
|
||||
if (beforeRunTask is PersistentStateComponent<*>) {
|
||||
if (<!USELESS_IS_CHECK!>beforeRunTask is PersistentStateComponent<*><!>) {
|
||||
deserializeAndLoadState(beforeRunTask)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,5 +14,5 @@ fun foo(u: U) {
|
||||
val w = +i
|
||||
|
||||
val g = "" !in u
|
||||
val f = "" !is Boolean
|
||||
val f = <!USELESS_IS_CHECK!>"" !is Boolean<!>
|
||||
}
|
||||
Reference in New Issue
Block a user