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