PSI2IR: SAM conversion in varargs

This commit is contained in:
Dmitry Petrov
2020-06-02 19:00:02 +03:00
parent 16f175612e
commit 5efbe6ae15
9 changed files with 125 additions and 11 deletions
@@ -0,0 +1,12 @@
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument
fun interface MyRunnable {
fun run()
}
fun test(a: Any, r: MyRunnable) {
if (a is MyRunnable) {
foo({}, r, a)
}
}
fun foo(vararg rs: MyRunnable) {}