PSI2IR tests for b29993739e85dbceb02d04a964741b1410a568f8
This commit is contained in:
@@ -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) {}
|
||||
}
|
||||
Reference in New Issue
Block a user