K1: change depr. level of List.getFirst to HIDDEN but don't force it on overrides

#KT-65441 Fixed
This commit is contained in:
Mikhail Glukhikh
2024-02-26 10:59:29 +01:00
committed by Space Team
parent d870d9dcc6
commit 91e9fbd9bf
5 changed files with 42 additions and 84 deletions
@@ -5,10 +5,10 @@ fun bar(x: List<String>) {
x.<!UNRESOLVED_REFERENCE!>addLast<!>("")
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>removeFirst<!>()
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>removeLast<!>()
x.<!DEPRECATION, JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE!>getFirst<!>()
x.<!DEPRECATION, JAVA_MODULE_DOES_NOT_EXPORT_PACKAGE!>getLast<!>()
x.<!DEPRECATION!>first<!>
x.<!DEPRECATION!>last<!>
x.<!UNRESOLVED_REFERENCE!>getFirst<!>()
x.<!UNRESOLVED_REFERENCE!>getLast<!>()
x.<!DEPRECATION_ERROR!>first<!>
x.<!DEPRECATION_ERROR!>last<!>
}
// Additional test for other SequenceCollection inheritor
@@ -17,10 +17,10 @@ fun baz(x: ArrayDeque<String>, y: LinkedHashSet<String>) {
x.addLast("")
x.removeFirst()
x.removeLast()
x.<!DEPRECATION!>getFirst<!>()
x.<!DEPRECATION!>getLast<!>()
x.<!DEPRECATION!>first<!>
x.<!DEPRECATION!>last<!>
x.<!UNRESOLVED_REFERENCE!>getFirst<!>()
x.<!UNRESOLVED_REFERENCE!>getLast<!>()
x.<!DEPRECATION_ERROR!>first<!>
x.<!DEPRECATION_ERROR!>last<!>
y.addFirst("")
y.addLast("")