FIR checker: differentiate UNSAFE_CALL from INAPPLICABLE_CANDIDATE

To do so, inside the root cause of inapplicable candidate errors,
we will record expected/actual type of receiver, if any.
That will help identifying inapplicable calls on nullable receiver.
This commit is contained in:
Jinseong Jeon
2021-01-26 16:03:27 -08:00
committed by Mikhail Glukhikh
parent 4b823eca21
commit e72ddbcbfe
275 changed files with 1426 additions and 1388 deletions
@@ -15,7 +15,7 @@ fun test2() {
catch (e: ExcB) {
10
}
s.<!INAPPLICABLE_CANDIDATE!>length<!>
s.<!UNSAFE_CALL!>length<!>
}
fun test3() {
@@ -28,7 +28,7 @@ fun test3() {
catch (e: ExcB) {
return
}
s.<!INAPPLICABLE_CANDIDATE!>length<!>
s.<!UNSAFE_CALL!>length<!>
}
fun test4() {
@@ -41,7 +41,7 @@ fun test4() {
finally {
""
}
s.<!INAPPLICABLE_CANDIDATE!>length<!>
s.<!UNSAFE_CALL!>length<!>
}
fun test5() {
@@ -54,7 +54,7 @@ fun test5() {
finally {
return
}
s.<!INAPPLICABLE_CANDIDATE!>length<!>
s.<!UNSAFE_CALL!>length<!>
}
fun test6() {
@@ -67,7 +67,7 @@ fun test6() {
catch (e: ExcB) {
return
}
s.<!INAPPLICABLE_CANDIDATE!>length<!>
s.<!UNSAFE_CALL!>length<!>
}
fun test7() {
@@ -80,7 +80,7 @@ fun test7() {
catch (e: ExcB) {
""
}
s.<!INAPPLICABLE_CANDIDATE!>length<!>
s.<!UNSAFE_CALL!>length<!>
}
fun test8() {
@@ -89,7 +89,7 @@ fun test8() {
} catch (e: ExcA) {
null
}
s.<!INAPPLICABLE_CANDIDATE!>length<!>
s.<!UNSAFE_CALL!>length<!>
}
fun test9() {