KT-9377 Support is-checks for read-only collections
Intrinsics for is/as/as? with mutable Kotlin collections and related types.
This commit is contained in:
@@ -6,6 +6,6 @@ class MyIterator<T>(val v: T): Iterator<T> {
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
(MyIterator<String>("") as MutableIterator<String>).remove()
|
||||
(MyIterator<String>("") as java.util.Iterator<String>).remove()
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user