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
@@ -20,7 +20,7 @@ inline fun case_1(value_1: Int?, block: () -> Unit): Boolean {
// TESTCASE NUMBER: 2
inline fun <T> T?.case_2(value_1: Int?, value_2: Any?, block: () -> Unit): Boolean? {
<!WRONG_IMPLIES_CONDITION!>contract {
<!WRONG_IMPLIES_CONDITION, WRONG_IMPLIES_CONDITION!>contract {
callsInPlace(block, InvocationKind.AT_MOST_ONCE)
returns(true) implies (value_1 == null && this@case_2 == null && value_2 !is Boolean?)
returns(false) implies (value_2 is Boolean?)