Lower fun interface children's body during inline class lowering

#KT-51121 Fixed
This commit is contained in:
Ilmir Usmanov
2022-02-21 02:29:16 +01:00
committed by teamcity
parent 72532f6f03
commit c072448d22
12 changed files with 163 additions and 10 deletions
@@ -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)