Change return type for iterator method of asList impls for *Array
These objects implement AbstractList that extending MutableCollection. After type propagation `iterator` of AbstractList become MutableIterator, so it cannot be overriden with immutable Iterator
This commit is contained in:
@@ -167,7 +167,7 @@ fun specialJVM(): List<GenericFunction> {
|
||||
override fun size(): Int = this@asList.size()
|
||||
override fun isEmpty(): Boolean = this@asList.isEmpty()
|
||||
override fun contains(o: Any?): Boolean = this@asList.contains(o as T)
|
||||
override fun iterator(): Iterator<T> = this@asList.iterator()
|
||||
override fun iterator(): MutableIterator<T> = this@asList.iterator() as MutableIterator<T>
|
||||
override fun get(index: Int): T = this@asList[index]
|
||||
override fun indexOf(o: Any?): Int = this@asList.indexOf(o as T)
|
||||
override fun lastIndexOf(o: Any?): Int = this@asList.lastIndexOf(o as T)
|
||||
|
||||
Reference in New Issue
Block a user