[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,32 @@
//If this test hangs, it means something is broken.
object A {
val iii = 42
}
//inappropriate but participating in resolve functions
fun foo(s: String, a: Any) = s + a
fun foo(a: Any) = a
fun foo(i: Int) = i
fun foo(a: Any, i: Int, f: ()-> Int) = "$a$i${f()}"
fun foo(f: (Int)->Int, i: Int) = f(i)
fun foo(f: (String)->Int, s: String) = f(s)
fun foo(f: (Any)->Int, a: Any) = f(a)
fun foo(s: String, f: (String, String)->Int) = f(s, s)
//appropriate function
fun foo(i: Int, f: (Int)->Int) = f(i)
fun <T> id(t: T) = t
fun test() {
<!INAPPLICABLE_CANDIDATE!>foo<!>(1, id { x1 ->
<!INAPPLICABLE_CANDIDATE!>foo<!>(2, id { x2 ->
<!INAPPLICABLE_CANDIDATE!>foo<!>(3, id { x3 ->
<!INAPPLICABLE_CANDIDATE!>foo<!>(4, id { x4 ->
<!INAPPLICABLE_CANDIDATE!>foo<!>(5, id { x5 ->
x1 + x2 + x3 + x4 + x5 + A.iii
})
})
})
})
})
}