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:
Denis Zharkov
2015-06-17 17:48:18 +03:00
parent afcdd27d67
commit 4479c215d4
2 changed files with 9 additions and 9 deletions
@@ -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)