[FIR] Report deprecation on synthetic property calls on super receivers
#KT-65438 Fixed
This commit is contained in:
committed by
Space Team
parent
35e9170af1
commit
e39af4583e
+22
-16
@@ -1,49 +1,55 @@
|
||||
/newListMethods.kt:13:18: warning: this declaration overrides deprecated member but not marked as deprecated itself. Please add @Deprecated annotation or suppress. See https://youtrack.jetbrains.com/issue/KT-47902 for details
|
||||
/newListMethods.kt:15:18: warning: this declaration overrides deprecated member but not marked as deprecated itself. Please add @Deprecated annotation or suppress. See https://youtrack.jetbrains.com/issue/KT-47902 for details
|
||||
override fun getFirst(): T = super.getFirst()
|
||||
^^^^^^^^
|
||||
/newListMethods.kt:13:40: warning: 'getFirst(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
/newListMethods.kt:15:40: warning: 'getFirst(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
override fun getFirst(): T = super.getFirst()
|
||||
^^^^^^^^
|
||||
/newListMethods.kt:14:18: warning: this declaration overrides deprecated member but not marked as deprecated itself. Please add @Deprecated annotation or suppress. See https://youtrack.jetbrains.com/issue/KT-47902 for details
|
||||
/newListMethods.kt:16:18: warning: this declaration overrides deprecated member but not marked as deprecated itself. Please add @Deprecated annotation or suppress. See https://youtrack.jetbrains.com/issue/KT-47902 for details
|
||||
override fun getLast(): T = super.getLast()
|
||||
^^^^^^^
|
||||
/newListMethods.kt:14:39: warning: 'getLast(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
/newListMethods.kt:16:39: warning: 'getLast(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
override fun getLast(): T = super.getLast()
|
||||
^^^^^^^
|
||||
/newListMethods.kt:25:7: warning: 'getFirst(): E!' is deprecated. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
/newListMethods.kt:18:34: warning: 'getFirst(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
fun superFirst2(): T = super.first
|
||||
^^^^^
|
||||
/newListMethods.kt:19:33: warning: 'getLast(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
fun superLast2(): T = super.last
|
||||
^^^^
|
||||
/newListMethods.kt:30:7: warning: 'getFirst(): E!' is deprecated. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
x.getFirst()
|
||||
^^^^^^^^
|
||||
/newListMethods.kt:26:7: warning: 'getter for first: E!' is deprecated. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
/newListMethods.kt:31:7: warning: 'getter for first: E!' is deprecated. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
x.first // synthetic property for getFirst()
|
||||
^^^^^
|
||||
/newListMethods.kt:28:7: warning: 'getLast(): E!' is deprecated. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
/newListMethods.kt:33:7: warning: 'getLast(): E!' is deprecated. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
x.getLast()
|
||||
^^^^^^^
|
||||
/newListMethods.kt:29:7: warning: 'getter for last: E!' is deprecated. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
/newListMethods.kt:34:7: warning: 'getter for last: E!' is deprecated. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
x.last
|
||||
^^^^
|
||||
/newListMethods.kt:37:7: warning: 'getFirst(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
/newListMethods.kt:42:7: warning: 'getFirst(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
y.getFirst()
|
||||
^^^^^^^^
|
||||
/newListMethods.kt:38:7: warning: 'getFirst(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
/newListMethods.kt:43:7: warning: 'getFirst(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
y.first
|
||||
^^^^^
|
||||
/newListMethods.kt:40:7: warning: 'getLast(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
/newListMethods.kt:45:7: warning: 'getLast(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
y.getLast()
|
||||
^^^^^^^
|
||||
/newListMethods.kt:41:7: warning: 'getLast(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
/newListMethods.kt:46:7: warning: 'getLast(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
y.last
|
||||
^^^^
|
||||
/newListMethods.kt:49:7: warning: 'getFirst(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
/newListMethods.kt:54:7: warning: 'getFirst(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
z.getFirst()
|
||||
^^^^^^^^
|
||||
/newListMethods.kt:50:7: warning: 'getFirst(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
/newListMethods.kt:55:7: warning: 'getFirst(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getFirst()' member of List is redundant in Kotlin and might be removed soon. Please use 'first()' stdlib extension instead
|
||||
z.first
|
||||
^^^^^
|
||||
/newListMethods.kt:52:7: warning: 'getLast(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
/newListMethods.kt:57:7: warning: 'getLast(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
z.getLast()
|
||||
^^^^^^^
|
||||
/newListMethods.kt:53:7: warning: 'getLast(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
/newListMethods.kt:58:7: warning: 'getLast(): E!' is deprecated. Overrides deprecated member in 'java.util.AbstractList'. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead
|
||||
z.last
|
||||
^^^^
|
||||
|
||||
|
||||
+20
-16
@@ -1,31 +1,35 @@
|
||||
/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:(337,345): 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:(359,367): 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:(387,394): 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:(408,415): 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'.
|
||||
/newListMethods.fir.kt:(452,457): warning: 'val first: 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:(613,618): error: Function invocation 'first()' expected.
|
||||
/newListMethods.fir.kt:(490,494): warning: 'val last: 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:(704,711): error: Unresolved reference 'getLast'.
|
||||
/newListMethods.fir.kt:(779,787): error: Unresolved reference 'getFirst'.
|
||||
|
||||
/newListMethods.fir.kt:(720,724): error: Function invocation 'last()' expected.
|
||||
/newListMethods.fir.kt:(796,801): error: Function invocation 'first()' expected.
|
||||
|
||||
/newListMethods.fir.kt:(838,846): warning: 'fun getFirst(): String!' 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:(887,894): error: Unresolved reference 'getLast'.
|
||||
|
||||
/newListMethods.fir.kt:(855,860): warning: 'val first: String!' 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:(903,907): error: Function invocation 'last()' expected.
|
||||
|
||||
/newListMethods.fir.kt:(881,888): warning: 'fun getLast(): String!' 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:(1021,1029): warning: 'fun getFirst(): String!' 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:(897,901): warning: 'val last: String!' 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:(1038,1043): warning: 'val first: String!' 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:(1015,1023): warning: 'fun getFirst(): String' 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:(1064,1071): warning: 'fun getLast(): String!' 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:(1032,1037): warning: 'val first: String' 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:(1080,1084): warning: 'val last: String!' 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:(1058,1065): warning: 'fun getLast(): String' 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:(1198,1206): warning: 'fun getFirst(): String' 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:(1074,1078): warning: 'val last: String' 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:(1215,1220): warning: 'val first: String' 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:(1241,1248): warning: 'fun getLast(): String' 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:(1257,1261): warning: 'val last: String' 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.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// ISSUE: KT-58371
|
||||
// RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// DIAGNOSTICS: -SUPER_CANT_BE_EXTENSION_RECEIVER
|
||||
// ^Otherwise only K1 errors are written to .diag file.
|
||||
|
||||
class A<T> : ArrayList<T>() {
|
||||
override fun addFirst(t: T) {
|
||||
@@ -13,6 +15,9 @@ class A<T> : ArrayList<T>() {
|
||||
override fun <!OVERRIDE_DEPRECATION!>getFirst<!>(): T = super.<!DEPRECATION!>getFirst<!>()
|
||||
override fun <!OVERRIDE_DEPRECATION!>getLast<!>(): T = super.<!DEPRECATION!>getLast<!>()
|
||||
|
||||
fun superFirst2(): T = super.<!DEPRECATION!>first<!>
|
||||
fun superLast2(): T = super.<!DEPRECATION!>last<!>
|
||||
|
||||
override fun removeFirst(): T = super.removeFirst()
|
||||
override fun removeLast(): T = super.removeLast()
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// ISSUE: KT-58371
|
||||
// RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// DIAGNOSTICS: -SUPER_CANT_BE_EXTENSION_RECEIVER
|
||||
// ^Otherwise only K1 errors are written to .diag file.
|
||||
|
||||
class A<T> : ArrayList<T>() {
|
||||
override fun addFirst(t: T) {
|
||||
@@ -13,6 +15,9 @@ class A<T> : ArrayList<T>() {
|
||||
override fun <!OVERRIDE_DEPRECATION!>getFirst<!>(): T = super.<!DEPRECATION!>getFirst<!>()
|
||||
override fun <!OVERRIDE_DEPRECATION!>getLast<!>(): T = super.<!DEPRECATION!>getLast<!>()
|
||||
|
||||
fun superFirst2(): T = super.<!DEPRECATION!>first<!>
|
||||
fun superLast2(): T = super.<!DEPRECATION!>last<!>
|
||||
|
||||
override fun removeFirst(): T = super.removeFirst()
|
||||
override fun removeLast(): T = super.removeLast()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user