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:
@@ -9,7 +9,7 @@ class MyCollection<T> : Collection<List<Iterator<T>>> {
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val c = MyCollection<String>() as MutableCollection<List<Iterator<String>>>
|
||||
val c = MyCollection<String>() as java.util.Collection<List<Iterator<String>>>
|
||||
try {
|
||||
c.add(ArrayList())
|
||||
return "Fail"
|
||||
|
||||
Reference in New Issue
Block a user