Files
kotlin-fork/compiler/testData/codegen/box/inlineClasses/kt50909.kt
T
Alexander Udalov 4baa74f396 Add regression tests for obsolete issues
#KT-50909
 #KT-50974
 #KT-51888
2022-09-28 23:18:59 +02:00

18 lines
322 B
Kotlin
Vendored

// TARGET_BACKEND: JVM_IR
// WITH_STDLIB
data class Parent(val child: Parent.Child?) {
val result =
if (this.child == null) foo(this.child)
else "Fail"
@JvmInline
value class Child(val value: String)
}
fun foo(x: String?): String =
x ?: "OK"
fun box(): String =
Parent(null).result