[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,22 @@
// !WITH_NEW_INFERENCE
//KT-1875 Safe call should be binded with receiver or this object (but not with both by default)
package kt1875
fun foo(a : Int?, b : Int.(Int)->Int) = a?.<!UNRESOLVED_REFERENCE!>b<!>(1) //unnecessary safe call warning
interface T {
val f : ((i: Int) -> Unit)?
}
fun test(t: T) {
t.<!INAPPLICABLE_CANDIDATE!>f<!>(1) //unsafe call error
t.f?.invoke(1)
}
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<!>?.<!UNRESOLVED_REFERENCE!>invoke<!>(1)
t?.f?.invoke(1)
}