PSI2IR tests for b29993739e85dbceb02d04a964741b1410a568f8

This commit is contained in:
Dmitry Petrov
2020-02-13 13:03:54 +03:00
parent 5a49ccac76
commit 0c984c5e62
8 changed files with 687 additions and 0 deletions
@@ -0,0 +1,40 @@
// !LANGUAGE: +NewInference +SamConversionPerArgument +SamConversionForKotlinFunctions
// WITH_JDK
// FILE: arrayAsVarargAfterSamArgument.kt
fun test(fn: () -> Unit, r: Runnable, arr: Array<String>) {
Test.foo1({}, arr)
Test.foo1({}, *arr)
Test.foo1(fn, arr)
Test.foo1(fn, *arr)
Test.foo1(r, "")
Test.foo1(fn, arr)
Test.foo1(fn, *arr)
Test.foo1(r, *arr)
val i1 = Test({}, arr)
val i2 = Test({}, *arr)
val i3 = Test({}, {}, arr)
val i4 = Test(r, {}, "")
val i5 = Test({}, {}, *arr)
val i6 = Test(r, {}, *arr)
i1.foo2({}, {}, arr)
i1.foo2(r, {}, "")
i1.foo2({}, {}, *arr)
i1.foo2(r, {}, *arr)
}
// FILE: Test.java
public class Test {
public static String foo1(Runnable r, String... strs) {
return null;
}
public String foo2(Runnable r1, Runnable r2, String... strs) {
return null;
}
public Test(Runnable r, String... strs) {}
public Test(Runnable r1, Runnable r2, String... strs) {}
}