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,24 @@
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
fun interface IRunnable {
fun run()
}
fun foo1(r: IRunnable, vararg s: String) {}
fun foo2(r1: IRunnable, r2: IRunnable, vararg s: String) {}
fun test(fn: () -> Unit, r: IRunnable, s: String, arr: Array<String>) {
foo1({}, s)
foo1({}, *arr)
foo1(fn, s)
foo1(fn, *arr)
foo1(r, s)
foo1(r, *arr)
foo2({}, {}, s)
foo2({}, {}, *arr)
foo2(fn, {}, s)
foo2(fn, {}, *arr)
foo2(r, {}, s)
foo2(r, {}, *arr)
}