Added AUTOCAST mark when expression is used as for-loop iterable.

This commit is contained in:
Evgeny Gerashchenko
2012-09-11 16:09:14 +04:00
parent 6ea3d8e300
commit 2f89352d80
2 changed files with 23 additions and 3 deletions
@@ -233,3 +233,10 @@ fun foo(var a: Any): Int {
}
return 1
}
fun inForLoop(x: Any?) {
if (x is Array<String>) {
for (i in <info descr="Automatically cast to jet.Array<jet.String>">x</info>) {}
}
for (i in <error descr="[ITERATOR_MISSING] For-loop range must have an iterator() method">x</error>) {}
}