Added for iterator when remove() is present.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class MyIterator<T>(val v: T): Iterator<T> {
|
||||
override fun next(): T = v
|
||||
override fun hasNext(): Boolean = true
|
||||
|
||||
public fun remove() {}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
(MyIterator<String>("") as MutableIterator<String>).remove()
|
||||
return "OK"
|
||||
}
|
||||
@@ -429,6 +429,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest("compiler/testData/codegen/box/builtinStubMethods/Iterator.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("IteratorWithRemove.kt")
|
||||
public void testIteratorWithRemove() throws Exception {
|
||||
doTest("compiler/testData/codegen/box/builtinStubMethods/IteratorWithRemove.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("List.kt")
|
||||
public void testList() throws Exception {
|
||||
doTest("compiler/testData/codegen/box/builtinStubMethods/List.kt");
|
||||
|
||||
Reference in New Issue
Block a user