mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 08:31:31 +00:00
13 lines
288 B
Kotlin
Vendored
13 lines
288 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// WITH_RUNTIME
|
|
|
|
inline class Z(private val i: Int) {
|
|
fun toByteArray() = ByteArray(1) { i.toByte() }
|
|
}
|
|
|
|
fun box(): String {
|
|
val z = Z(42)
|
|
if (z.toByteArray()[0].toInt() != 42) throw AssertionError()
|
|
return "OK"
|
|
} |