Drop unnecessary suppress from stdlib
^KT-62785 Fixed Review: https://jetbrains.team/p/kt/reviews/12858/files
This commit is contained in:
@@ -12,7 +12,6 @@ package kotlin.collections
|
||||
*
|
||||
* @param E the type of elements contained in the collection. The collection is invariant in its element type.
|
||||
*/
|
||||
@Suppress("ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING", "ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_SUPERTYPES_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING") // Can be dropped after bootstrap update
|
||||
public actual abstract class AbstractMutableCollection<E> protected actual constructor() : AbstractCollection<E>(), MutableCollection<E> {
|
||||
|
||||
actual abstract override fun add(element: E): Boolean
|
||||
@@ -57,7 +56,6 @@ public actual abstract class AbstractMutableCollection<E> protected actual const
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update
|
||||
@Deprecated("Provided so that subclasses inherit this function", level = DeprecationLevel.HIDDEN)
|
||||
@JsName("toJSON")
|
||||
protected fun toJSON(): Any = this.toArray()
|
||||
@@ -67,7 +65,6 @@ public actual abstract class AbstractMutableCollection<E> protected actual const
|
||||
* This method is called every time when a mutating method is called on this mutable collection.
|
||||
* Mutable collections that are built (frozen) must throw `UnsupportedOperationException`.
|
||||
*/
|
||||
@Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update
|
||||
internal open fun checkIsMutable(): Unit { }
|
||||
}
|
||||
|
||||
|
||||
@@ -17,12 +17,7 @@ package kotlin.collections
|
||||
*
|
||||
* @param E the type of elements contained in the list. The list is invariant in its element type.
|
||||
*/
|
||||
@Suppress(
|
||||
"ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING",
|
||||
"ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_SUPERTYPES_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING"
|
||||
) // Can be dropped after bootstrap update
|
||||
public actual abstract class AbstractMutableList<E> protected actual constructor() : AbstractMutableCollection<E>(), MutableList<E> {
|
||||
@Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update
|
||||
protected var modCount: Int = 0
|
||||
|
||||
abstract override fun add(index: Int, element: E): Unit
|
||||
@@ -86,7 +81,6 @@ public actual abstract class AbstractMutableList<E> protected actual constructor
|
||||
/**
|
||||
* Removes the range of elements from this list starting from [fromIndex] and ending with but not including [toIndex].
|
||||
*/
|
||||
@Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update
|
||||
protected open fun removeRange(fromIndex: Int, toIndex: Int) {
|
||||
val iterator = listIterator(fromIndex)
|
||||
repeat(toIndex - fromIndex) {
|
||||
|
||||
@@ -18,12 +18,9 @@ package kotlin.collections
|
||||
* @param K the type of map keys. The map is invariant in its key type.
|
||||
* @param V the type of map values. The map is invariant in its value type.
|
||||
*/
|
||||
@Suppress("ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING", "ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_SUPERTYPES_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING") // Can be dropped after bootstrap update
|
||||
public actual abstract class AbstractMutableMap<K, V> protected actual constructor() : AbstractMap<K, V>(), MutableMap<K, V> {
|
||||
|
||||
@Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update
|
||||
internal open fun createKeysView(): MutableSet<K> = HashMapKeysDefault(this)
|
||||
@Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update
|
||||
internal open fun createValuesView(): MutableCollection<V> = HashMapValuesDefault(this)
|
||||
|
||||
private var keysView: MutableSet<K>? = null
|
||||
@@ -68,6 +65,5 @@ public actual abstract class AbstractMutableMap<K, V> protected actual construct
|
||||
* This method is called every time when a mutating method is called on this mutable map.
|
||||
* Mutable maps that are built (frozen) must throw `UnsupportedOperationException`.
|
||||
*/
|
||||
@Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update
|
||||
internal open fun checkIsMutable() {}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ package kotlin.collections
|
||||
*
|
||||
* @param E the type of elements contained in the set. The set is invariant in its element type.
|
||||
*/
|
||||
@Suppress("ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING", "ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_SUPERTYPES_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING") // Can be dropped after bootstrap update
|
||||
public actual abstract class AbstractMutableSet<E> protected actual constructor() : AbstractMutableCollection<E>(), MutableSet<E> {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user