K1: change depr. level of List.getFirst to HIDDEN but don't force it on overrides
#KT-65441 Fixed
This commit is contained in:
committed by
Space Team
parent
d870d9dcc6
commit
91e9fbd9bf
@@ -12,11 +12,11 @@ class A<T> : ArrayList<T>() {
|
||||
super.addLast(t)
|
||||
}
|
||||
|
||||
override fun <!OVERRIDE_DEPRECATION!>getFirst<!>(): T = super.<!DEPRECATION!>getFirst<!>()
|
||||
override fun <!OVERRIDE_DEPRECATION!>getLast<!>(): T = super.<!DEPRECATION!>getLast<!>()
|
||||
override fun <!OVERRIDE_DEPRECATION!>getFirst<!>(): T = super.getFirst()
|
||||
override fun <!OVERRIDE_DEPRECATION!>getLast<!>(): T = super.getLast()
|
||||
|
||||
fun superFirst2(): T = super.<!DEPRECATION!>first<!>
|
||||
fun superLast2(): T = super.<!DEPRECATION!>last<!>
|
||||
fun superFirst2(): T = super.first
|
||||
fun superLast2(): T = super.last
|
||||
|
||||
override fun removeFirst(): T = super.removeFirst()
|
||||
override fun removeLast(): T = super.removeLast()
|
||||
@@ -27,11 +27,11 @@ class A<T> : ArrayList<T>() {
|
||||
fun foo(x: MutableList<String>, y: ArrayList<String>, z: A<String>) {
|
||||
x.addFirst("")
|
||||
x.addLast("")
|
||||
x.<!DEPRECATION!>getFirst<!>()
|
||||
x.<!DEPRECATION!>first<!> // synthetic property for getFirst()
|
||||
x.<!UNRESOLVED_REFERENCE!>getFirst<!>()
|
||||
x.<!DEPRECATION_ERROR!>first<!> // synthetic property for getFirst()
|
||||
x.first() // stdlib extension on List
|
||||
x.<!DEPRECATION!>getLast<!>()
|
||||
x.<!DEPRECATION!>last<!>
|
||||
x.<!UNRESOLVED_REFERENCE!>getLast<!>()
|
||||
x.<!DEPRECATION_ERROR!>last<!>
|
||||
x.last()
|
||||
x.<!DEBUG_INFO_CALL("fqName: kotlin.collections.MutableList.removeFirst; typeCall: function")!>removeFirst()<!>
|
||||
x.<!DEBUG_INFO_CALL("fqName: kotlin.collections.MutableList.removeLast; typeCall: function")!>removeLast()<!>
|
||||
@@ -39,11 +39,11 @@ fun foo(x: MutableList<String>, y: ArrayList<String>, z: A<String>) {
|
||||
|
||||
y.addFirst("")
|
||||
y.addLast("")
|
||||
y.<!DEPRECATION!>getFirst<!>()
|
||||
y.<!DEPRECATION!>first<!>
|
||||
y.getFirst()
|
||||
y.first
|
||||
y.first()
|
||||
y.<!DEPRECATION!>getLast<!>()
|
||||
y.<!DEPRECATION!>last<!>
|
||||
y.getLast()
|
||||
y.last
|
||||
y.last()
|
||||
y.<!DEBUG_INFO_CALL("fqName: java.util.ArrayList.removeFirst; typeCall: function")!>removeFirst()<!>
|
||||
y.<!DEBUG_INFO_CALL("fqName: java.util.ArrayList.removeLast; typeCall: function")!>removeLast()<!>
|
||||
@@ -51,11 +51,11 @@ fun foo(x: MutableList<String>, y: ArrayList<String>, z: A<String>) {
|
||||
|
||||
z.addFirst("")
|
||||
z.addLast("")
|
||||
z.<!DEPRECATION!>getFirst<!>()
|
||||
z.<!DEPRECATION!>first<!>
|
||||
z.getFirst()
|
||||
z.first
|
||||
z.first()
|
||||
z.<!DEPRECATION!>getLast<!>()
|
||||
z.<!DEPRECATION!>last<!>
|
||||
z.getLast()
|
||||
z.last
|
||||
z.last()
|
||||
z.<!DEBUG_INFO_CALL("fqName: A.removeFirst; typeCall: function")!>removeFirst()<!>
|
||||
z.<!DEBUG_INFO_CALL("fqName: A.removeLast; typeCall: function")!>removeLast()<!>
|
||||
|
||||
Reference in New Issue
Block a user