Minor. Add more tests
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Z<T: Int>(private val i: T) {
|
||||
fun toByteArray() = ByteArray(1) { i.toByte() }
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val z = Z(42)
|
||||
if (z.toByteArray()[0].toInt() != 42) throw AssertionError()
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user