be6409f0af
#KT-49812 Fixed #KT-49936 Fixed
12 lines
244 B
Kotlin
Vendored
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()
|