-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
K1: change depr. level of List.getFirst to HIDDEN but don't force it …
…on overrides #KT-65441 Fixed (cherry picked from commit 91e9fbd)
- Loading branch information
1 parent
c041815
commit d3b2c6f
Showing
5 changed files
with
41 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 5 additions & 40 deletions
45
compiler/testData/diagnostics/testsWithJdk21/newListMethods.diag.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,13 @@ | ||
/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 | ||
override fun getFirst(): T = super.getFirst() | ||
^ | ||
/newListMethods.kt:14: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: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 getLast(): T = super.getLast() | ||
^ | ||
/newListMethods.kt:15: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:26: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:26:7: error: unresolved reference: getFirst | ||
x.getFirst() | ||
^ | ||
/newListMethods.kt:27: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:27:7: error: using 'getter for first: E!' is an error. '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:29: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:29:7: error: unresolved reference: getLast | ||
x.getLast() | ||
^ | ||
/newListMethods.kt:30: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:30:7: error: using 'getter for last: E!' is an error. 'getLast()' member of List is redundant in Kotlin and might be removed soon. Please use 'last()' stdlib extension instead | ||
x.last | ||
^ | ||
/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 | ||
y.getFirst() | ||
^ | ||
/newListMethods.kt:39: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: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 | ||
y.getLast() | ||
^ | ||
/newListMethods.kt:42: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: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 | ||
z.getFirst() | ||
^ | ||
/newListMethods.kt:51: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: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 | ||
z.getLast() | ||
^ | ||
/newListMethods.kt:54: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 | ||
^ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters