blob: 3239b764c8d8d23c36cb71705cda01ed2f7c0f90 [file] [log] [blame]
// WITH_STDLIB
// WORKS_WHEN_VALUE_CLASS
// LANGUAGE: +ValueClasses
OPTIONAL_JVM_INLINE_ANNOTATION
value 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"
}