mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
17 lines
316 B
Kotlin
Vendored
17 lines
316 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
|
|
inline class UInt(private val data: Int) {
|
|
fun result(): String = if (data == 1) "OK" else "fail"
|
|
}
|
|
|
|
fun f(): UInt {
|
|
val unull = UInt(1) ?: null
|
|
return nonNull(unull)
|
|
}
|
|
|
|
fun nonNull(u: UInt?) = u!!
|
|
|
|
fun box(): String {
|
|
return f().result()
|
|
} |