KT-1779: test for obsolete issue

This commit is contained in:
Alex Tkachman
2012-08-04 21:41:25 +03:00
parent 5c8863dafe
commit 186807a6d7
2 changed files with 22 additions and 0 deletions
@@ -0,0 +1,18 @@
import kotlin.support.AbstractIterator
class MyIterator : AbstractIterator<String>() {
var i = 0
public override fun computeNext() {
if(i < 5)
setNext((i++).toString())
}
}
fun box() : String {
var k = ""
for (x in MyIterator()) {
k+=x
}
return if(k=="01234") "OK" else k
}