[FIR] Report OVERRIDE_DEPRECATION for overrides of HIDDEN_IN_DECLARING_CLASS_ONLY
#KT-65438 Fixed
This commit is contained in:
committed by
Space Team
parent
24367e0ad8
commit
e8cbd8a1cd
+4
@@ -1,5 +1,9 @@
|
||||
/newListMethods.fir.kt:(231,239): warning: This declaration overrides a deprecated member but is not marked as deprecated itself. Please add the '@Deprecated' annotation or suppress the diagnostic.
|
||||
|
||||
/newListMethods.fir.kt:(253,261): warning: 'fun getFirst(): T!' is deprecated. This declaration will be renamed in a future version of Kotlin. Please consider using the 'first()' stdlib extension if the collection supports fast random access.
|
||||
|
||||
/newListMethods.fir.kt:(281,288): warning: This declaration overrides a deprecated member but is not marked as deprecated itself. Please add the '@Deprecated' annotation or suppress the diagnostic.
|
||||
|
||||
/newListMethods.fir.kt:(302,309): warning: 'fun getLast(): T!' is deprecated. This declaration will be renamed in a future version of Kotlin. Please consider using the 'last()' stdlib extension if the collection supports fast random access.
|
||||
|
||||
/newListMethods.fir.kt:(596,604): error: Unresolved reference 'getFirst'.
|
||||
|
||||
@@ -10,8 +10,8 @@ class A<T> : ArrayList<T>() {
|
||||
super.addLast(t)
|
||||
}
|
||||
|
||||
override fun getFirst(): T = super.<!DEPRECATION!>getFirst<!>()
|
||||
override fun getLast(): T = super.<!DEPRECATION!>getLast<!>()
|
||||
override fun <!OVERRIDE_DEPRECATION!>getFirst<!>(): T = super.<!DEPRECATION!>getFirst<!>()
|
||||
override fun <!OVERRIDE_DEPRECATION!>getLast<!>(): T = super.<!DEPRECATION!>getLast<!>()
|
||||
|
||||
override fun removeFirst(): T = super.removeFirst()
|
||||
override fun removeLast(): T = super.removeLast()
|
||||
|
||||
Reference in New Issue
Block a user