Files
kotlin/compiler/testData/codegen/box/dataClasses/toString/arrayParams.kt
Alexander Udalov 20e36438e2 Move some tests from boxWithStdlib/ to box/
Move those tests which do not require neither stdlib nor reflect
2016-03-09 10:25:38 +03:00

15 lines
372 B
Kotlin
Vendored

data class A(val x: Array<Int>?, val y: IntArray?)
fun box(): String {
var ts = A(Array<Int>(2, {it}), IntArray(3)).toString()
if(ts != "A(x=[0, 1], y=[0, 0, 0])") return ts
ts = A(null, IntArray(3)).toString()
if(ts != "A(x=null, y=[0, 0, 0])") return ts
ts = A(null, null).toString()
if(ts != "A(x=null, y=null)") return ts
return "OK"
}