K1/K2: add more tests regarding SequencedCollection.add/remove calls

Related to KT-64640
This commit is contained in:
Mikhail Glukhikh
2024-01-05 12:36:16 +01:00
committed by Space Team
parent 0ef41d75b5
commit ae358fe194
2 changed files with 26 additions and 0 deletions
@@ -7,3 +7,16 @@ fun bar(x: List<String>) {
x.<!UNRESOLVED_REFERENCE!>removeFirst<!>()
x.<!UNRESOLVED_REFERENCE!>removeLast<!>()
}
// Additional test for other SequenceCollection inheritor
fun baz(x: ArrayDeque<String>, y: LinkedHashSet<String>) {
x.addFirst("")
x.addLast("")
x.removeFirst()
x.removeLast()
x.addFirst("")
x.addLast("")
x.removeFirst()
x.removeLast()
}
@@ -7,3 +7,16 @@ fun bar(x: List<String>) {
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>removeFirst<!>()
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>removeLast<!>()
}
// Additional test for other SequenceCollection inheritor
fun baz(x: ArrayDeque<String>, y: LinkedHashSet<String>) {
x.addFirst("")
x.addLast("")
x.removeFirst()
x.removeLast()
x.addFirst("")
x.addLast("")
x.removeFirst()
x.removeLast()
}