JVM_IR pass reified type parameters in indy SAM conversion proxy

This commit is contained in:
Dmitry Petrov
2021-10-07 12:37:08 +03:00
committed by teamcityserver
parent 40fe67880b
commit 005d3b1f6f
15 changed files with 221 additions and 7 deletions
@@ -0,0 +1,19 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// SAM_CONVERSIONS: INDY
// WITH_RUNTIME
// CHECK_BYTECODE_TEXT
// JVM_IR_TEMPLATES
// 1 java/lang/invoke/LambdaMetafactory
// FILE: highOrderFunRef.kt
fun applyO(fn: (String) -> String) = fn("O")
fun box() = J(::applyO).invoke { it + "K" }
// FILE: J.java
public interface J {
String invoke(kotlin.jvm.functions.Function1<String, String> fn);
}