KT-31908 Handle SAM conversion on vararg elements

This commit is contained in:
Dmitry Petrov
2020-06-02 15:54:50 +03:00
parent 343af60cb4
commit 16f175612e
11 changed files with 152 additions and 31 deletions
+17
View File
@@ -0,0 +1,17 @@
// TARGET_BACKEND: JVM
// FILE: kt31908.kt
fun box(): String {
var result = "failed"
val r = java.lang.Runnable { result += "K" }
J().foo({ result = "O" }, r)
return result
}
// FILE: J.java
public class J {
public void foo(Runnable... rs) {
for (Runnable r : rs) {
r.run();
}
}
}