JVM_IR: serialize anonymous functions' descriptors

This commit is contained in:
pyos
2019-11-22 14:03:30 +01:00
committed by Alexander Udalov
parent e246c23a46
commit 98660cdf2d
11 changed files with 79 additions and 3 deletions
@@ -1,5 +1,4 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_REFLECT
@@ -0,0 +1,13 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_REFLECT
import kotlin.reflect.jvm.reflect
class C {
val x = { OK: String -> }
}
fun box(): String {
return C().x.reflect()?.parameters?.singleOrNull()?.name ?: "null"
}
@@ -0,0 +1,12 @@
// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_REFLECT
import kotlin.reflect.jvm.reflect
val x = { OK: String -> }
fun box(): String {
return x.reflect()?.parameters?.singleOrNull()?.name ?: "null"
}