Files
kotlin-fork/nj2k/testData/newJ2k/mutableCollections/Iterator.kt
T
Ilya Kirillov f950a0246c New J2K: handle correctly short names which are imported by default in kotlin (like List or Result)
Kotlin default import inserter was unable to correctly insert such imports

#KT-34165 fixed
2019-10-04 15:17:35 +03:00

18 lines
556 B
Kotlin
Vendored

import java.util.HashMap
internal class IteratorTest {
var mutableMap1: MutableMap<String, String> = HashMap()
var mutableMap2: MutableMap<String, String> = HashMap()
fun testFields() {
mutableMap1.values.add("")
mutableMap2.entries.iterator().remove()
}
fun testFunctionParameters(immutableCollection: Collection<String?>, mutableList: MutableList<Int?>) {
val it = immutableCollection.iterator()
while (it.hasNext()) {
it.next()
}
mutableList.listIterator().add(2)
}
}