FIR DFA: align return-implies checker closer to smartcasts

This commit is contained in:
pyos
2022-11-08 20:21:41 +01:00
committed by teamcity
parent 512deeb07b
commit 6ee6d019ee
5 changed files with 12 additions and 10 deletions
@@ -31,9 +31,9 @@ fun testNullWhenNull(x: Int?) {
// NB. it is the same function as `nullWhenNull`, but annotations specifies other facet of the function behaviour
fun notNullWhenNotNull (x: Int?): Int? {
contract {
<!WRONG_IMPLIES_CONDITION!>contract {
returns(null) implies (x == null)
}
}<!>
return x?.inc()
}