EA-39177 - CCE: ArrayIterator.generate

If local variable is auto-casted to array, it should be iterated as array.
This commit is contained in:
Evgeny Gerashchenko
2012-09-13 23:24:58 +04:00
parent 2f89352d80
commit c33b880a57
4 changed files with 20 additions and 3 deletions
@@ -0,0 +1,10 @@
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"}))