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