Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
161333d3e7d13dd98386fe346a71a07eadfe4756
/
.
/
compiler
/
testData
/
codegen
/
box
/
inlineClasses
/
unboxValueOfNullableInlineClassUsingInlineFunction.kt
blob: 35a48c4c387b14472ee0c0d1a177f40781e00fb9 [
file
]
// WITH_STDLIB
// WORKS_WHEN_VALUE_CLASS
inline
class
X
(
val i
:
Int
)
fun unbox
(
x
:
X
?):
Int
=
checkNotNull
(
x
).
i
fun box
():
String
=
if
(
unbox
(
X
(
42
))
==
42
)
"OK"
else
"Fail"