Files
kotlin-fork/j2k/testData/fileOrElement/list/Lists.kt
T
Denis Zharkov 151231ef1a Adjust testData
Standard JDK collections purely implement kotlin.Mutable* with non-platform arguments
2015-07-09 16:36:47 +03:00

17 lines
863 B
Kotlin
Vendored

// ERROR: Unresolved reference: LinkedList
// ERROR: None of the following functions can be called with the arguments supplied: public open fun add(e: kotlin.Any): kotlin.Boolean defined in java.util.ArrayList public open fun add(index: kotlin.Int, element: kotlin.Any): kotlin.Unit defined in java.util.ArrayList
// ERROR: None of the following functions can be called with the arguments supplied: public open fun add(e: kotlin.Any): kotlin.Boolean defined in java.util.ArrayList public open fun add(index: kotlin.Int, element: kotlin.Any): kotlin.Unit defined in java.util.ArrayList
import java.util.*
public class Lists {
public fun test() {
val xs = ArrayList<Any>()
val ys = LinkedList<Any>()
val zs = ArrayList<Any>()
xs.add(null)
ys.add(null)
xs.clear()
ys.clear()
zs.add(null)
}
}