c33b880a57
If local variable is auto-casted to array, it should be iterated as array.
11 lines
184 B
Kotlin
11 lines
184 B
Kotlin
fun f(x: Any?): String {
|
|
if (x is Array<String>) {
|
|
for (i in x) {
|
|
return i
|
|
}
|
|
}
|
|
return "FAIL"
|
|
}
|
|
|
|
fun box(): String = f(Array<String>(1, {"OK"}))
|