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)
This commit is contained in:
anzhela.sukhanova
2024-01-09 18:34:22 +02:00
committed by Space Team
parent b7fbfb2fde
commit 741c8eeba5
3 changed files with 50 additions and 0 deletions
@@ -0,0 +1,14 @@
// 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")
}