Add test for KT-27140

This commit is contained in:
Dmitry Petrov
2018-09-26 10:15:44 +03:00
parent 1901331ee5
commit 0b23ddb947
6 changed files with 38 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
// !LANGUAGE: +InlineClasses
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR
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"
}