diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/reflect/KCallable.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/reflect/KCallable.kt index 4d847cae05f..0f2096b55e9 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/reflect/KCallable.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/reflect/KCallable.kt @@ -10,7 +10,10 @@ package kotlin.reflect * * @param R return type of the callable. */ -@AllowDifferentMembersInActual // New 'KAnnotatedElement` supertype is added compared to the expect declaration +@Suppress( + "ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_SUPERTYPES_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING", + "ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING" +) // Can be dropped after bootstrap update public actual interface KCallable : KAnnotatedElement { /** * The name of this callable as it was declared in the source code. @@ -26,5 +29,6 @@ public actual interface KCallable : KAnnotatedElement { /** * The type of values returned by this callable. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update public val returnType: KType } diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/reflect/KClass.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/reflect/KClass.kt index d6f6f79d517..bf36da19d59 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/reflect/KClass.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/reflect/KClass.kt @@ -13,7 +13,7 @@ package kotlin.reflect * * @param T the type of the class. */ -@AllowDifferentMembersInActual // New 'KDeclarationContainer', 'KAnnotatedElement` supertypes are added compared to the expect declaration +@Suppress("ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_SUPERTYPES_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING") // Can be dropped after bootstrap update public actual interface KClass : KDeclarationContainer, KAnnotatedElement, KClassifier { /** * The simple name of the class as it was declared in the source code, diff --git a/libraries/stdlib/api/js/kotlin.kt b/libraries/stdlib/api/js/kotlin.kt index 9be8720126b..be598196b3c 100644 --- a/libraries/stdlib/api/js/kotlin.kt +++ b/libraries/stdlib/api/js/kotlin.kt @@ -846,15 +846,6 @@ public inline fun kotlin.Short.toUShort(): kotlin.UShort @kotlin.internal.InlineOnly public inline fun T.use(block: (T) -> R): R -@kotlin.annotation.Retention(value = AnnotationRetention.SOURCE) -@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.TYPEALIAS}) -@kotlin.annotation.MustBeDocumented -@kotlin.ExperimentalMultiplatform -@kotlin.SinceKotlin(version = "1.9") -public final annotation class AllowDifferentMembersInActual : kotlin.Annotation { - public constructor AllowDifferentMembersInActual() -} - public interface Annotation { } diff --git a/libraries/stdlib/js/src/kotlin/collections/AbstractMutableCollection.kt b/libraries/stdlib/js/src/kotlin/collections/AbstractMutableCollection.kt index dd4169c4166..b38545c436c 100644 --- a/libraries/stdlib/js/src/kotlin/collections/AbstractMutableCollection.kt +++ b/libraries/stdlib/js/src/kotlin/collections/AbstractMutableCollection.kt @@ -12,7 +12,7 @@ package kotlin.collections * * @param E the type of elements contained in the collection. The collection is invariant in its element type. */ -@AllowDifferentMembersInActual // New 'checkIsMutable', 'toJSON', etc. members are added compared to the expect declaration +@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 protected actual constructor() : AbstractCollection(), MutableCollection { actual abstract override fun add(element: E): Boolean @@ -57,6 +57,7 @@ public actual abstract class AbstractMutableCollection 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() @@ -66,6 +67,7 @@ public actual abstract class AbstractMutableCollection 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 { } } diff --git a/libraries/stdlib/js/src/kotlin/collections/AbstractMutableList.kt b/libraries/stdlib/js/src/kotlin/collections/AbstractMutableList.kt index 153a9a96ae8..1850fe9c98d 100644 --- a/libraries/stdlib/js/src/kotlin/collections/AbstractMutableList.kt +++ b/libraries/stdlib/js/src/kotlin/collections/AbstractMutableList.kt @@ -17,8 +17,12 @@ package kotlin.collections * * @param E the type of elements contained in the list. The list is invariant in its element type. */ -@AllowDifferentMembersInActual // New 'removeRange', 'checkIsMutable', etc. members are added compared to the expect declaration +@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 protected actual constructor() : AbstractMutableCollection(), MutableList { + @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 @@ -82,6 +86,7 @@ public actual abstract class AbstractMutableList 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) { diff --git a/libraries/stdlib/js/src/kotlin/collections/AbstractMutableMap.kt b/libraries/stdlib/js/src/kotlin/collections/AbstractMutableMap.kt index 8f48c9a3a10..64cbb661072 100644 --- a/libraries/stdlib/js/src/kotlin/collections/AbstractMutableMap.kt +++ b/libraries/stdlib/js/src/kotlin/collections/AbstractMutableMap.kt @@ -18,10 +18,12 @@ 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. */ -@AllowDifferentMembersInActual // New 'createKeysView', 'checkIsMutable', etc. members are added compared to the expect declaration +@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 protected actual constructor() : AbstractMap(), MutableMap { + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update internal open fun createKeysView(): MutableSet = 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 = HashMapValuesDefault(this) private var keysView: MutableSet? = null @@ -66,5 +68,6 @@ public actual abstract class AbstractMutableMap 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() {} } diff --git a/libraries/stdlib/js/src/kotlin/collections/AbstractMutableSet.kt b/libraries/stdlib/js/src/kotlin/collections/AbstractMutableSet.kt index 2065107c55d..df11715a2e2 100644 --- a/libraries/stdlib/js/src/kotlin/collections/AbstractMutableSet.kt +++ b/libraries/stdlib/js/src/kotlin/collections/AbstractMutableSet.kt @@ -9,7 +9,7 @@ package kotlin.collections * * @param E the type of elements contained in the set. The set is invariant in its element type. */ -@AllowDifferentMembersInActual // New 'AbstractMutableCollection` supertype is added compared to the expect declaration +@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 protected actual constructor() : AbstractMutableCollection(), MutableSet { /** diff --git a/libraries/stdlib/jvm/runtime/kotlin/TypeAliases.kt b/libraries/stdlib/jvm/runtime/kotlin/TypeAliases.kt index e40b6783baf..82a57d9e640 100644 --- a/libraries/stdlib/jvm/runtime/kotlin/TypeAliases.kt +++ b/libraries/stdlib/jvm/runtime/kotlin/TypeAliases.kt @@ -28,5 +28,5 @@ package kotlin @Suppress("NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS") @SinceKotlin("1.3") public actual typealias ConcurrentModificationException = java.util.ConcurrentModificationException -@AllowDifferentMembersInActual // New 'reversed', 'thenComparing', etc. members are added compared to the expect declaration +@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 @SinceKotlin("1.1") public actual typealias Comparator = java.util.Comparator diff --git a/libraries/stdlib/jvm/runtime/kotlin/text/TypeAliases.kt b/libraries/stdlib/jvm/runtime/kotlin/text/TypeAliases.kt index e26ceb0730b..3613ac7ee01 100644 --- a/libraries/stdlib/jvm/runtime/kotlin/text/TypeAliases.kt +++ b/libraries/stdlib/jvm/runtime/kotlin/text/TypeAliases.kt @@ -7,7 +7,7 @@ package kotlin.text -@AllowDifferentMembersInActual // New 'append' members are added compared to the expect declaration +@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 @SinceKotlin("1.1") public actual typealias Appendable = java.lang.Appendable @Suppress("ACTUAL_WITHOUT_EXPECT") // TODO: some supertypes are missing diff --git a/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableCollection.kt b/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableCollection.kt index ff3b1e00d5c..81f17afee60 100644 --- a/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableCollection.kt +++ b/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableCollection.kt @@ -13,7 +13,7 @@ import java.util.AbstractCollection * @param E the type of elements contained in the collection. The collection is invariant in its element type. */ @SinceKotlin("1.1") -@AllowDifferentMembersInActual // New 'AbstractCollection` supertype is added compared to the expect declaration +@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 protected actual constructor() : MutableCollection, AbstractCollection() { /** * Adds the specified element to the collection. diff --git a/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableList.kt b/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableList.kt index 8c04dbf6b24..192876ab5a9 100644 --- a/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableList.kt +++ b/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableList.kt @@ -13,7 +13,7 @@ import java.util.AbstractList * @param E the type of elements contained in the list. The list is invariant in its element type. */ @SinceKotlin("1.1") -@AllowDifferentMembersInActual // New 'AbstractList` supertype is added compared to the expect declaration +@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 protected actual constructor() : MutableList, AbstractList() { /** * Replaces the element at the specified position in this list with the specified element. diff --git a/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableMap.kt b/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableMap.kt index 267c0db9d15..6c89c22b58e 100644 --- a/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableMap.kt +++ b/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableMap.kt @@ -16,7 +16,7 @@ import java.util.AbstractMap * @param V the type of map values. The map is invariant in its value type. */ @SinceKotlin("1.1") -@AllowDifferentMembersInActual // New 'AbstractMap` supertype is added compared to the expect declaration +@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 protected actual constructor() : MutableMap, AbstractMap() { /** * Associates the specified [value] with the specified [key] in the map. diff --git a/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableSet.kt b/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableSet.kt index f6ad33fdaf9..264da9e63c9 100644 --- a/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableSet.kt +++ b/libraries/stdlib/jvm/src/kotlin/collections/AbstractMutableSet.kt @@ -13,7 +13,7 @@ import java.util.AbstractSet * @param E the type of elements contained in the set. The set is invariant in its element type. */ @SinceKotlin("1.1") -@AllowDifferentMembersInActual // New 'AbstractSet` supertype is added compared to the expect declaration +@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 protected actual constructor() : MutableSet, AbstractSet() { /** * Adds the specified element to the set. diff --git a/libraries/stdlib/jvm/src/kotlin/reflect/KCallable.kt b/libraries/stdlib/jvm/src/kotlin/reflect/KCallable.kt index 585cc591e99..3aa08bfe314 100644 --- a/libraries/stdlib/jvm/src/kotlin/reflect/KCallable.kt +++ b/libraries/stdlib/jvm/src/kotlin/reflect/KCallable.kt @@ -10,7 +10,7 @@ package kotlin.reflect * * @param R return type of the callable. */ -@AllowDifferentMembersInActual // New 'KAnnotatedElement` supertype is added compared to the expect declaration +@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 interface KCallable : KAnnotatedElement { /** * The name of this callable as it was declared in the source code. @@ -28,16 +28,19 @@ public actual interface KCallable : KAnnotatedElement { * If this callable requires a `this` instance or an extension receiver parameter, * they come first in the list in that order. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update public val parameters: List /** * The type of values returned by this callable. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update public val returnType: KType /** * The list of type parameters of this callable. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val typeParameters: List @@ -46,6 +49,7 @@ public actual interface KCallable : KAnnotatedElement { * Throws an exception if the number of specified arguments is not equal to the size of [parameters], * or if their types do not match the types of the parameters. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update public fun call(vararg args: Any?): R /** @@ -53,35 +57,41 @@ public actual interface KCallable : KAnnotatedElement { * If a parameter is not found in the mapping and is not optional (as per [KParameter.isOptional]), * or its type does not match the type of the provided value, an exception is thrown. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update public fun callBy(args: Map): R /** * Visibility of this callable, or `null` if its visibility cannot be represented in Kotlin. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val visibility: KVisibility? /** * `true` if this callable is `final`. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isFinal: Boolean /** * `true` if this callable is `open`. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isOpen: Boolean /** * `true` if this callable is `abstract`. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isAbstract: Boolean /** * `true` if this is a suspending function. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.3") public val isSuspend: Boolean } diff --git a/libraries/stdlib/jvm/src/kotlin/reflect/KClass.kt b/libraries/stdlib/jvm/src/kotlin/reflect/KClass.kt index 89043e2925f..d01e64e86b9 100644 --- a/libraries/stdlib/jvm/src/kotlin/reflect/KClass.kt +++ b/libraries/stdlib/jvm/src/kotlin/reflect/KClass.kt @@ -13,7 +13,7 @@ package kotlin.reflect * * @param T the type of the class. */ -@AllowDifferentMembersInActual // KClass for JVM adds a lot of new members compared to the expect declaration +@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 interface KClass : KDeclarationContainer, KAnnotatedElement, KClassifier { /** * The simple name of the class as it was declared in the source code, @@ -31,21 +31,25 @@ public actual interface KClass : KDeclarationContainer, KAnnotatedEleme * All functions and properties accessible in this class, including those declared in this class * and all of its superclasses. Does not include constructors. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update override val members: Collection> /** * All constructors declared in this class. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update public val constructors: Collection> /** * All classes declared inside this class. This includes both inner and static nested classes. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update public val nestedClasses: Collection> /** * The instance of the object declaration, or `null` if this class is not an object declaration. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update public val objectInstance: T? /** @@ -57,42 +61,49 @@ public actual interface KClass : KDeclarationContainer, KAnnotatedEleme /** * The list of type parameters of this class. This list does *not* include type parameters of outer classes. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val typeParameters: List /** * The list of immediate supertypes of this class, in the order they are listed in the source code. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val supertypes: List /** * The list of the immediate subclasses if this class is a sealed class, or an empty list otherwise. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.3") public val sealedSubclasses: List> /** * Visibility of this class, or `null` if its visibility cannot be represented in Kotlin. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val visibility: KVisibility? /** * `true` if this class is `final`. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isFinal: Boolean /** * `true` if this class is `open`. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isOpen: Boolean /** * `true` if this class is `abstract`. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isAbstract: Boolean @@ -101,6 +112,7 @@ public actual interface KClass : KDeclarationContainer, KAnnotatedEleme * See the [Kotlin language documentation](https://kotlinlang.org/docs/reference/sealed-classes.html) * for more information. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isSealed: Boolean @@ -110,6 +122,7 @@ public actual interface KClass : KDeclarationContainer, KAnnotatedEleme * [data object](https://kotlinlang.org/docs/object-declarations.html#data-objects) * in the Kotlin language documentation. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isData: Boolean @@ -118,6 +131,7 @@ public actual interface KClass : KDeclarationContainer, KAnnotatedEleme * See the [Kotlin language documentation](https://kotlinlang.org/docs/reference/nested-classes.html#inner-classes) * for more information. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isInner: Boolean @@ -126,18 +140,21 @@ public actual interface KClass : KDeclarationContainer, KAnnotatedEleme * See the [Kotlin language documentation](https://kotlinlang.org/docs/reference/object-declarations.html#companion-objects) * for more information. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isCompanion: Boolean /** * `true` if this class is a Kotlin functional interface. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.4") public val isFun: Boolean /** * `true` if this class is a value class. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.5") public val isValue: Boolean diff --git a/libraries/stdlib/jvm/src/kotlin/reflect/KFunction.kt b/libraries/stdlib/jvm/src/kotlin/reflect/KFunction.kt index 885cd0c68f9..753b6ef7d63 100644 --- a/libraries/stdlib/jvm/src/kotlin/reflect/KFunction.kt +++ b/libraries/stdlib/jvm/src/kotlin/reflect/KFunction.kt @@ -8,13 +8,14 @@ package kotlin.reflect /** * Represents a function with introspection capabilities. */ -@AllowDifferentMembersInActual // KFunction for JVM adds a lot of new members compared to the expect declaration +@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 interface KFunction : KCallable, Function { /** * `true` if this function is `inline`. * See the [Kotlin language documentation](https://kotlinlang.org/docs/reference/inline-functions.html) * for more information. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isInline: Boolean @@ -23,6 +24,7 @@ public actual interface KFunction : KCallable, Function { * See the [Kotlin language documentation](https://kotlinlang.org/docs/reference/java-interop.html#using-jni-with-kotlin) * for more information. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isExternal: Boolean @@ -31,6 +33,7 @@ public actual interface KFunction : KCallable, Function { * See the [Kotlin language documentation](https://kotlinlang.org/docs/reference/operator-overloading.html) * for more information. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isOperator: Boolean @@ -39,6 +42,7 @@ public actual interface KFunction : KCallable, Function { * See the [Kotlin language documentation](https://kotlinlang.org/docs/reference/functions.html#infix-notation) * for more information. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isInfix: Boolean diff --git a/libraries/stdlib/jvm/src/kotlin/reflect/KProperty.kt b/libraries/stdlib/jvm/src/kotlin/reflect/KProperty.kt index 67f8a10493b..20b47e44e7d 100644 --- a/libraries/stdlib/jvm/src/kotlin/reflect/KProperty.kt +++ b/libraries/stdlib/jvm/src/kotlin/reflect/KProperty.kt @@ -15,13 +15,14 @@ package kotlin.reflect * * @param V the type of the property value. */ -@AllowDifferentMembersInActual // KProperty for JVM adds new members compared to the expect declaration +@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 interface KProperty : KCallable { /** * `true` if this property is `lateinit`. * See the [Kotlin language documentation](https://kotlinlang.org/docs/reference/properties.html#late-initialized-properties) * for more information. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isLateinit: Boolean @@ -30,10 +31,12 @@ public actual interface KProperty : KCallable { * See the [Kotlin language documentation](https://kotlinlang.org/docs/reference/properties.html#compile-time-constants) * for more information. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public val isConst: Boolean /** The getter of this property, used to obtain the value of the property. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update public val getter: Getter /** @@ -57,9 +60,10 @@ public actual interface KProperty : KCallable { /** * Represents a property declared as a `var`. */ -@AllowDifferentMembersInActual // New 'setter' member is added compared to the expect declaration +@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 interface KMutableProperty : KProperty { /** The setter of this mutable property, used to change the value of the property. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update public val setter: Setter /** @@ -74,7 +78,7 @@ public actual interface KMutableProperty : KProperty { * Such property is either originally declared in a receiverless context such as a package, * or has the receiver bound to it. */ -@AllowDifferentMembersInActual // New 'getDelegate' and 'getter' members are added compared to the expect declaration +@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 interface KProperty0 : KProperty, () -> V { /** * Returns the current value of the property. @@ -86,9 +90,11 @@ public actual interface KProperty0 : KProperty, () -> V { * See the [Kotlin language documentation](https://kotlinlang.org/docs/reference/delegated-properties.html) * for more information. */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public fun getDelegate(): Any? + @Suppress("RETURN_TYPE_CHANGED_IN_NON_FINAL_EXPECT_CLASSIFIER_ACTUALIZATION_WARNING") // Covariant 'setter' override. The suppress can be dropped in K2 KT-61184 override val getter: Getter /** @@ -102,7 +108,7 @@ public actual interface KProperty0 : KProperty, () -> V { /** * Represents a `var`-property without any kind of receiver. */ -@AllowDifferentMembersInActual // Covariant 'setter' override. The annotations can be dropped in K2 KT-61184 +@Suppress("ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING") // Covariant 'setter' override. The suppress can be dropped in K2 KT-61184 public actual interface KMutableProperty0 : KProperty0, KMutableProperty { /** * Modifies the value of the property. @@ -111,6 +117,7 @@ public actual interface KMutableProperty0 : KProperty0, KMutableProperty /** @@ -128,7 +135,7 @@ public actual interface KMutableProperty0 : KProperty0, KMutableProperty : KProperty, (T) -> V { /** * Returns the current value of the property. @@ -153,9 +160,11 @@ public actual interface KProperty1 : KProperty, (T) -> V { * * @see [kotlin.reflect.full.getExtensionDelegate] // [KProperty1.getExtensionDelegate] */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public fun getDelegate(receiver: T): Any? + @Suppress("RETURN_TYPE_CHANGED_IN_NON_FINAL_EXPECT_CLASSIFIER_ACTUALIZATION_WARNING") // Covariant 'getter' override. The suppress can be dropped in K2 KT-61184 override val getter: Getter /** @@ -169,7 +178,7 @@ public actual interface KProperty1 : KProperty, (T) -> V { /** * Represents a `var`-property, operations on which take one receiver as a parameter. */ -@AllowDifferentMembersInActual // Covariant 'setter' override. The annotations can be dropped in K2 KT-61184 +@Suppress("ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING") // Covariant 'setter' override. The suppress can be dropped in K2 KT-61184 public actual interface KMutableProperty1 : KProperty1, KMutableProperty { /** * Modifies the value of the property. @@ -181,6 +190,7 @@ public actual interface KMutableProperty1 : KProperty1, KMutableProp */ public actual fun set(receiver: T, value: V) + @Suppress("RETURN_TYPE_CHANGED_IN_NON_FINAL_EXPECT_CLASSIFIER_ACTUALIZATION_WARNING") // Covariant 'setter' override. The suppress can be dropped in K2 KT-61184 override val setter: Setter /** @@ -202,7 +212,7 @@ public actual interface KMutableProperty1 : KProperty1, KMutableProp * the type of the extension receiver. * @param V the type of the property value. */ -@AllowDifferentMembersInActual // New 'getDelegate' and 'getter' members are added compared to the expect declaration +@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 interface KProperty2 : KProperty, (D, E) -> V { /** * Returns the current value of the property. In case of the extension property in a class, @@ -226,9 +236,11 @@ public actual interface KProperty2 : KProperty, (D, E) -> V { * * @see [kotlin.reflect.full.getExtensionDelegate] // [KProperty2.getExtensionDelegate] */ + @Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION_WARNING") // Can be dropped after bootstrap update @SinceKotlin("1.1") public fun getDelegate(receiver1: D, receiver2: E): Any? + @Suppress("RETURN_TYPE_CHANGED_IN_NON_FINAL_EXPECT_CLASSIFIER_ACTUALIZATION_WARNING") // Covariant 'getter' override. The suppress can be dropped in K2 KT-61184 override val getter: Getter /** @@ -243,7 +255,7 @@ public actual interface KProperty2 : KProperty, (D, E) -> V { /** * Represents a `var`-property, operations on which take two receivers as parameters. */ -@AllowDifferentMembersInActual // Covariant 'setter' override. The annotations can be dropped in K2 KT-61184 +@Suppress("ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER_WARNING") // Covariant 'setter' override. The suppress can be dropped in K2 KT-61184 public actual interface KMutableProperty2 : KProperty2, KMutableProperty { /** * Modifies the value of the property. @@ -254,6 +266,7 @@ public actual interface KMutableProperty2 : KProperty2, KMutab */ public actual fun set(receiver1: D, receiver2: E, value: V) + @Suppress("RETURN_TYPE_CHANGED_IN_NON_FINAL_EXPECT_CLASSIFIER_ACTUALIZATION_WARNING") // Covariant 'setter' override. The suppress can be dropped in K2 KT-61184 override val setter: Setter /** diff --git a/libraries/stdlib/jvm/src/kotlin/reflect/KType.kt b/libraries/stdlib/jvm/src/kotlin/reflect/KType.kt index f56bbd7275a..8a5b2859347 100644 --- a/libraries/stdlib/jvm/src/kotlin/reflect/KType.kt +++ b/libraries/stdlib/jvm/src/kotlin/reflect/KType.kt @@ -9,7 +9,7 @@ package kotlin.reflect * Represents a type. Type is usually either a class with optional type arguments, * or a type parameter of some declaration, plus nullability. */ -@AllowDifferentMembersInActual // New 'KAnnotatedElement` supertype is added compared to the expect declaration +@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 interface KType : KAnnotatedElement { /** * The declaration of the classifier used in this type. diff --git a/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableCollection.kt b/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableCollection.kt index f1984fc6bb3..0bfc00c69d7 100644 --- a/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableCollection.kt +++ b/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableCollection.kt @@ -10,7 +10,7 @@ package kotlin.collections * * @param E the type of elements contained in the collection. The collection is invariant in its element type. */ -@AllowDifferentMembersInActual // New 'AbstractCollection` supertype is added compared to the expect declaration +@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 protected actual constructor(): MutableCollection, AbstractCollection() { // Bulk Modification Operations diff --git a/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableList.kt b/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableList.kt index ffe371aa4e3..6a7b5b6febb 100644 --- a/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableList.kt +++ b/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableList.kt @@ -17,7 +17,10 @@ package kotlin.collections * * @param E the type of elements contained in the list. The list is invariant in its element type. */ -@AllowDifferentMembersInActual // New 'removeRange', 'modCount' members are added compared to the expect declaration +@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 protected actual constructor() : AbstractMutableCollection(), MutableList { /** * The number of times this list is structurally modified. @@ -29,6 +32,7 @@ public actual abstract class AbstractMutableList protected actual constructor * to provide fail-fast behavoir when a concurrent modification is detected during iteration. * [ConcurrentModificationException] will be thrown in this case. */ + @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 @@ -82,6 +86,7 @@ public actual abstract class AbstractMutableList 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) { diff --git a/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableMap.kt b/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableMap.kt index 93f05543774..f8d3d124feb 100644 --- a/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableMap.kt +++ b/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableMap.kt @@ -8,7 +8,7 @@ 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. */ -@AllowDifferentMembersInActual // New 'AbstractMap` supertype is added compared to the expect declaration +@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 @SinceKotlin("1.1") public actual abstract class AbstractMutableMap protected actual constructor() : AbstractMap(), MutableMap { /** diff --git a/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableSet.kt b/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableSet.kt index bbcac4168fa..8eb94d9d6e8 100644 --- a/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableSet.kt +++ b/libraries/stdlib/native-wasm/src/kotlin/collections/AbstractMutableSet.kt @@ -5,7 +5,7 @@ package kotlin.collections * * @param E the type of elements contained in the set. The set is invariant in its element type. */ -@AllowDifferentMembersInActual // New 'AbstractMutableCollection` supertype is added compared to the expect declaration +@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 @SinceKotlin("1.1") public actual abstract class AbstractMutableSet protected actual constructor() : AbstractMutableCollection(), MutableSet { /** diff --git a/libraries/stdlib/src/kotlin/annotations/AllowDifferentMembersInActual.kt b/libraries/stdlib/src/kotlin/annotations/AllowDifferentMembersInActual.kt deleted file mode 100644 index 1bbe9a19175..00000000000 --- a/libraries/stdlib/src/kotlin/annotations/AllowDifferentMembersInActual.kt +++ /dev/null @@ -1,37 +0,0 @@ -package kotlin - -import kotlin.annotation.AnnotationTarget.* - -/** - * Kotlin reports a compilation error for cases when non-final `expect class` and its counterpart `actual class` have different set of - * non-private members (e.g. when a new member declared in `actual class` that wasn't presented in its `expect class`, or when - * modality is different). - * - * By marking `actual class` with this annotation, you suppress the compilation error mentioned above. - * - * ## Safety Risks - * - * Using this annotation causes undefined behaviour, it's not known what can break because of that. Be prepared that at some point this - * annotation might become deprecated, and you'd need to migrate your code. - * - * If you use this annotation and can't migrate, consider describing your use cases in - * [KT-22841](https://youtrack.jetbrains.com/issue/KT-22841) comments. - * - * ## Migration - * - * Please consider the following alternatives: - * - Make members in `expect class` and `actual class` the same - * - If the member was declared only in `actual class` then you'd need to declare it in the `expect class` as well - * - If the member is already declared in the `expect class` then make sure that the member is the same in the `actual class` (modality is - * the same, visibility is the same, return type is the same, etc.) - * - Make the `expect class` `final`. You might need to rewrite your code to use composition instead of inheritance. - * - Mark the members under the question as `private` - * - * [AllowDifferentMembersInActual] is supposed to be used for the transition period. - */ -@Retention(AnnotationRetention.SOURCE) -@Target(CLASS, TYPEALIAS) -@MustBeDocumented -@ExperimentalMultiplatform -@SinceKotlin("1.9") -public annotation class AllowDifferentMembersInActual diff --git a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt index abd1d0066d9..6421e1703c0 100644 --- a/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt +++ b/libraries/tools/binary-compatibility-validator/reference-public-api/kotlin-stdlib-runtime-merged.txt @@ -1,6 +1,3 @@ -public abstract interface annotation class kotlin/AllowDifferentMembersInActual : java/lang/annotation/Annotation { -} - public abstract interface annotation class kotlin/BuilderInference : java/lang/annotation/Annotation { }