Files
kotlin-fork/compiler/testData/codegen/box/dataClasses/components/kt49812.kt
T
Alexander Udalov be6409f0af Fix property lookup in data class component generation
#KT-49812 Fixed
 #KT-49936 Fixed
2021-12-02 01:43:39 +01:00

12 lines
244 B
Kotlin
Vendored

// WITH_STDLIB
data class Foo(val result: Result<Boolean>) {
val Boolean.result: String get() = if (this) "OK" else "Fail"
fun f(): String =
result.getOrNull()!!.result
}
fun box(): String =
Foo(Result.success(true)).f()