Files
kotlin-fork/compiler/testData/diagnostics/tests/testsWithJava21/newLinkedHashMapMethods.kt
T
anzhela.sukhanova 741c8eeba5 Tests for KT-64640
Add test for other collections with (add/remove)(First/Last) methods. Add test for LinkedHashMap.put(First/Last) methods (they are also appeared in Java 21)
2024-01-12 08:08:20 +00:00

15 lines
351 B
Kotlin
Vendored

// ISSUE: KT-64640
// WITH_STDLIB
// FIR_IDENTICAL
fun foo(x: LinkedHashMap<Int, String>, y: java.util.SequencedMap<Int, String>, z: HashMap<Int, String>) {
x.putFirst(0, "0")
x.putLast(1, "1")
y.putFirst(0, "0")
y.putLast(1, "1")
z.<!UNRESOLVED_REFERENCE!>putFirst<!>(0, "0")
z.<!UNRESOLVED_REFERENCE!>putLast<!>(1, "1")
}