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:
+1
-1
@@ -66,7 +66,7 @@ fun case_2(value_1: Int?, value_2: Int?, value_3: Any?) {
|
||||
println(value_2)
|
||||
}
|
||||
null -> {
|
||||
println(value_3?.xor(true))
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_3?.<!UNRESOLVED_REFERENCE!>xor<!>(true))
|
||||
println(<!UNINITIALIZED_VARIABLE!>value_4<!>)
|
||||
println(value_1)
|
||||
println(value_2)
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ fun case_2(value_1: Int?, value_2: Int?, value_3: Any?) {
|
||||
println(value_2)
|
||||
}
|
||||
null -> {
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>println<!>(value_3?.<!UNRESOLVED_REFERENCE!>xor<!>(true))
|
||||
println(value_3?.xor(true))
|
||||
println(value_4)
|
||||
println(value_1)
|
||||
println(value_2)
|
||||
|
||||
Reference in New Issue
Block a user