JVM_IR add more tests for specialized generics and reification

This commit is contained in:
Dmitry Petrov
2021-10-12 12:50:59 +03:00
committed by teamcityserver
parent 0098103376
commit a213dad9ab
6 changed files with 89 additions and 0 deletions
@@ -0,0 +1,17 @@
// TARGET_BACKEND: JVM
// JVM_TARGET: 1.8
// SAM_CONVERSIONS: INDY
// CHECK_BYTECODE_TEXT
// JVM_IR_TEMPLATES
// 1 java/lang/invoke/LambdaMetafactory
fun interface GenericToAny<T> {
fun invoke(Inner: T): T
}
fun <T> foo2(t: T, g: GenericToAny<T>): T = g.invoke(t)
fun box(): String {
return foo2("OK") { it }
}