Files
kotlin-fork/compiler/testData/codegen/box/arrays/kt3771.kt
T
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
346 B
Kotlin
Vendored

fun fill(dest : Array<in String>, v : String) {
dest[0] = v
}
fun box() : String {
//fun main(args : Array<String>) {
val s : String = "bar"
val any : Array<Any> = arrayOf(1, "foo", 1.234)
fill(any, s)
/* shouldn't throw
ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;
*/
return "OK"
}