Files
kotlin/compiler/testData/codegen/bytecodeText/inlineClasses/resultMangling.kt
2020-05-20 07:19:30 +03:00

15 lines
315 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
// IGNORE_BACKEND: JVM_IR
// WITH_RUNTIME
// FILE: test.kt
inline class A(val s: String) {
fun fromResult(x: Result<String>) =
x.getOrNull() ?: s
}
fun box(): String {
return A("Fail").fromResult(Result.success("OK"))
}
// @TestKt.class:
// 1 INVOKESTATIC A.fromResult