[FIR] Add ReturnsImplies effect analyzer

This commit is contained in:
Oleg Ivanov
2020-08-11 12:41:43 +03:00
parent 3454ae7ca4
commit 21b8679799
37 changed files with 1110 additions and 89 deletions
@@ -5,9 +5,9 @@
import kotlin.contracts.*
fun safeIsString(x: Any?): Boolean? {
contract {
<!WRONG_IMPLIES_CONDITION!>contract {
returns(true) implies (x is String)
}
}<!>
return x?.let { it is String }
}