8c2f5c767f
Related to KT-64640
21 lines
378 B
Kotlin
Vendored
21 lines
378 B
Kotlin
Vendored
// TARGET_BACKEND: JVM_IR
|
|
|
|
fun foo(x: MutableList<String>) {
|
|
x.addFirst("1")
|
|
x.addLast("2")
|
|
}
|
|
|
|
fun bar(x: MutableList<String>) {
|
|
x.removeFirst()
|
|
x.removeLast()
|
|
}
|
|
|
|
fun box(): String {
|
|
val list = mutableListOf("OK")
|
|
foo(list)
|
|
if (list.first() != "1") return "FAIL 1"
|
|
if (list.last() != "2") return "FAIL 2"
|
|
bar(list)
|
|
return list.single()
|
|
}
|