JVM_IR: do not deep-copy suspend lambdas in initializers
This loses reflection metadata (and also sometimes fails). Which was missing anyway - this is also fixed now. #KT-42554 Fixed
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_REFLECT
|
||||
|
||||
import kotlin.reflect.jvm.reflect
|
||||
|
||||
class C {
|
||||
val x: suspend (String) -> Unit = { OK: String -> }
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return C().x.reflect()?.parameters?.singleOrNull()?.name ?: "null"
|
||||
}
|
||||
Reference in New Issue
Block a user