Lower fun interface children's body during inline class lowering
#KT-51121 Fixed
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
// IGNORE_BACKEND: JVM
|
||||
// FILE: 1.kt
|
||||
|
||||
fun interface F {
|
||||
fun foo(s: String): Z
|
||||
}
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Z(val value: String)
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
val f: F = F { value -> Z(value) }
|
||||
|
||||
fun box(): String =
|
||||
f.foo("OK").value
|
||||
@@ -0,0 +1,20 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
// IGNORE_BACKEND: JVM
|
||||
// FILE: 1.kt
|
||||
|
||||
val f: F = F { value -> Z(value) }
|
||||
|
||||
fun box(): String =
|
||||
f.foo("OK").value
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
fun interface F {
|
||||
fun foo(s: String): Z
|
||||
}
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Z(val value: String)
|
||||
|
||||
Reference in New Issue
Block a user