FIR DFA: generate type implications on all null comparisons

This commit is contained in:
pyos
2022-11-08 12:10:33 +01:00
committed by teamcity
parent bc9b358c9f
commit 6a2d74e211
13 changed files with 145 additions and 232 deletions
@@ -39,12 +39,12 @@ fun bar(o: Any) {
fun baz(o: Boolean?) {
if (o ?: false) {
o<!UNSAFE_CALL!>.<!>hashCode()
o.hashCode()
}
if (o ?: true) {
}
else {
o<!UNSAFE_CALL!>.<!>hashCode()
o.hashCode()
}
}
+1 -1
View File
@@ -22,7 +22,7 @@ fun foo() : Int {
<!USELESS_IS_CHECK!>!is Int<!> -> 1
<!USELESS_IS_CHECK!>is Any?<!> -> 1
<!USELESS_IS_CHECK!>is Any<!> -> 1
<!INCOMPATIBLE_TYPES!>s<!> -> 1
s -> 1
1 -> 1
1 <!OVERLOAD_RESOLUTION_AMBIGUITY!>+<!> <!UNRESOLVED_REFERENCE!>a<!> -> 1
in 1..<!UNRESOLVED_REFERENCE!>a<!> -> 1