FIR: Fix diagnostics test data after safe-call refactoring

^KT-38444 In Progress
This commit is contained in:
Denis Zharkov
2020-06-01 16:06:12 +03:00
parent 723b275d99
commit 55a4c40970
8 changed files with 16 additions and 16 deletions
@@ -2,7 +2,7 @@
package kt1875
fun foo(a : Int?, b : Int.(Int)->Int) = a?.<!INAPPLICABLE_CANDIDATE!>b<!>(1) //unnecessary safe call warning
fun foo(a : Int?, b : Int.(Int)->Int) = a?.b(1) //unnecessary safe call warning
interface T {
val f : ((i: Int) -> Unit)?
@@ -15,7 +15,7 @@ fun test(t: T) {
fun test1(t: T?) {
t.<!UNRESOLVED_REFERENCE!>f<!>(1) // todo resolve f as value and report UNSAFE_CALL
t?.f(1)
t?.<!INAPPLICABLE_CANDIDATE!>f<!>(1)
t.<!INAPPLICABLE_CANDIDATE!>f<!>?.<!UNRESOLVED_REFERENCE!>invoke<!>(1)
t?.f?.invoke(1)
}
}