Files
kotlin-fork/compiler/testData/codegen/boxInline/reified/singletonLambda.kt
T
pyos a15a5aa429 JVM_IR: generate instance fields even when reification is needed
The inliner supports that, we just need to generate the reification
markers on GETFIELD to instance fields.
2021-08-23 14:27:51 +02:00

19 lines
327 B
Kotlin
Vendored

// CHECK_BYTECODE_LISTING
// FILE: 1.kt
package test
inline fun <reified U> bar() = U::class.simpleName!!
inline fun <reified T> foo(): String {
val x = { bar<Array<T>>() }
return x()
}
// FILE: 2.kt
import test.*
fun box(): String {
val result = foo<Int>()
return if (result == "Array") "OK" else result
}