FIR DFA: don't assume != true/false => == false/true
This also fixes some returnsNotNull contracts because the old code added an implication that `== true` => `!= null` then promptly removed any statement that this could've affected if the argument was a synthetic variable. ^KT-26612 tag fixed-in-k2
This commit is contained in:
+3
-3
@@ -28,7 +28,7 @@ fun equalsFalse(x: Any?) {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
else {
|
||||
x.length
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ fun notEqualsTrue(x: Any?) {
|
||||
|
||||
fun notEqualsFalse(x: Any?) {
|
||||
if (safeIsString(x) != false) {
|
||||
x.length
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
@@ -66,4 +66,4 @@ fun notEqualsNull(x: Any?) {
|
||||
else {
|
||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user