Files
kotlin/compiler/testData/codegen/boxWithJava/functions/removeInIterator.kt
Alexander Udalov 86938f57b1 Remove codegen tests with Java, move testData to boxWithJava/
There'll be a single generated test class like
BlackBoxCodegenTestGenerated
2013-01-28 18:20:37 +04:00

14 lines
383 B
Kotlin

fun box() : String {
try {
removeInIterator.bar(object : Iterator<Int> {
public override fun hasNext(): Boolean = false
public override fun next(): Int = 1
})
}
catch (e: UnsupportedOperationException) {
if (e.getMessage() == "Mutating method called on a Kotlin Iterator")
return "OK"
}
return "fail"
}