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:
@@ -23,7 +23,7 @@ fun expectUoe(block: () -> Any) {
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val list = MyList() as MutableList<String>
|
||||
val list = MyList() as java.util.List<String>
|
||||
|
||||
expectUoe { list.add("") }
|
||||
expectUoe { list.remove("") }
|
||||
|
||||
Reference in New Issue
Block a user