Files
kotlin-fork/nj2k/testData/newJ2k/list/ForEach.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

15 lines
310 B
Kotlin
Vendored

// ERROR: Unresolved reference: LinkedList
import java.util.ArrayList
class ForEach {
fun test() {
val xs = ArrayList<Any>()
val ys: MutableList<Any> = LinkedList<Any>()
for (x in xs) {
ys.add(x)
}
for (y in ys) {
xs.add(y)
}
}
}