741c1a864f
if it is unbound and the underlying type is reference type. If the underlying type is primitive, it is boxed and unboxed correctly, otherwise, it is simply casted and not unboxed. Additionally, generate functions for inliner with inline classes in signature, so unboxing works. The unboxing is removed after inlining. #KT-44722 Fixed
23 lines
411 B
Kotlin
Vendored
23 lines
411 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
// KJS_WITH_FULL_RUNTIME
|
|
|
|
object Foo {
|
|
fun foo(result: Result<String>) {
|
|
res = result.getOrNull()!!
|
|
}
|
|
|
|
fun bar(result: Result<String>?) {
|
|
res = result?.getOrNull()!!
|
|
}
|
|
}
|
|
|
|
var res = "FAIL"
|
|
|
|
fun box(): String {
|
|
Result.success("OK").let(Foo::foo)
|
|
if (res != "OK") return "FAIL 1 $res"
|
|
res = "FAIL"
|
|
|
|
Result.success("OK").let(Foo::bar)
|
|
return res
|
|
} |