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.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// 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
|
||||
}
|
||||
Reference in New Issue
Block a user