[STDLIB] 1/2 Drop AllowDifferentMembersInActual from stdlib
^KT-62656 Fixed I blindly converted all `@AllowDifferentMembersInActual` to suppresses. But some suppresses in stdlib are redundant. I'm too lazy properly annotate only the necessary places. All these suppresses will go away after the bootstrap update anyway I drop allowDifferentMembersInActual_class and allowDifferentMembersInActual_typealias tests because their only purpose was to check that `@AllowDifferentMembersInActual` works as expected Note: some tests are failing in the compiler because of that. I will fix them in the next commit
This commit is contained in:
@@ -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<T> = java.util.Comparator<T>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<E> protected actual constructor() : MutableCollection<E>, AbstractCollection<E>() {
|
||||
/**
|
||||
* Adds the specified element to the collection.
|
||||
|
||||
@@ -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<E> protected actual constructor() : MutableList<E>, AbstractList<E>() {
|
||||
/**
|
||||
* Replaces the element at the specified position in this list with the specified element.
|
||||
|
||||
@@ -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<K, V> protected actual constructor() : MutableMap<K, V>, AbstractMap<K, V>() {
|
||||
/**
|
||||
* Associates the specified [value] with the specified [key] in the map.
|
||||
|
||||
@@ -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<E> protected actual constructor() : MutableSet<E>, AbstractSet<E>() {
|
||||
/**
|
||||
* Adds the specified element to the set.
|
||||
|
||||
@@ -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<out R> : KAnnotatedElement {
|
||||
/**
|
||||
* The name of this callable as it was declared in the source code.
|
||||
@@ -28,16 +28,19 @@ public actual interface KCallable<out R> : 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<KParameter>
|
||||
|
||||
/**
|
||||
* 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<KTypeParameter>
|
||||
|
||||
@@ -46,6 +49,7 @@ public actual interface KCallable<out R> : 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<out R> : 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<KParameter, Any?>): 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
|
||||
}
|
||||
|
||||
@@ -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<T : Any> : 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<T : Any> : 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<KCallable<*>>
|
||||
|
||||
/**
|
||||
* 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<KFunction<T>>
|
||||
|
||||
/**
|
||||
* 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<KClass<*>>
|
||||
|
||||
/**
|
||||
* 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<T : Any> : 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<KTypeParameter>
|
||||
|
||||
/**
|
||||
* 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<KType>
|
||||
|
||||
/**
|
||||
* 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<KClass<out T>>
|
||||
|
||||
/**
|
||||
* 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<T : Any> : 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<T : Any> : 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<T : Any> : 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<T : Any> : 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
|
||||
|
||||
|
||||
@@ -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<out R> : KCallable<R>, Function<R> {
|
||||
/**
|
||||
* `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<out R> : KCallable<R>, Function<R> {
|
||||
* 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<out R> : KCallable<R>, Function<R> {
|
||||
* 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<out R> : KCallable<R>, Function<R> {
|
||||
* 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
|
||||
|
||||
|
||||
@@ -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<out V> : KCallable<V> {
|
||||
/**
|
||||
* `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<out V> : KCallable<V> {
|
||||
* 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<V>
|
||||
|
||||
/**
|
||||
@@ -57,9 +60,10 @@ public actual interface KProperty<out V> : KCallable<V> {
|
||||
/**
|
||||
* 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<V> : KProperty<V> {
|
||||
/** 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<V>
|
||||
|
||||
/**
|
||||
@@ -74,7 +78,7 @@ public actual interface KMutableProperty<V> : KProperty<V> {
|
||||
* 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<out V> : KProperty<V>, () -> V {
|
||||
/**
|
||||
* Returns the current value of the property.
|
||||
@@ -86,9 +90,11 @@ public actual interface KProperty0<out V> : KProperty<V>, () -> 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<V>
|
||||
|
||||
/**
|
||||
@@ -102,7 +108,7 @@ public actual interface KProperty0<out V> : KProperty<V>, () -> 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<V> : KProperty0<V>, KMutableProperty<V> {
|
||||
/**
|
||||
* Modifies the value of the property.
|
||||
@@ -111,6 +117,7 @@ public actual interface KMutableProperty0<V> : KProperty0<V>, KMutableProperty<V
|
||||
*/
|
||||
public actual fun set(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<V>
|
||||
|
||||
/**
|
||||
@@ -128,7 +135,7 @@ public actual interface KMutableProperty0<V> : KProperty0<V>, KMutableProperty<V
|
||||
* @param T the type of the receiver which should be used to obtain the value of the property.
|
||||
* @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 KProperty1<T, out V> : KProperty<V>, (T) -> V {
|
||||
/**
|
||||
* Returns the current value of the property.
|
||||
@@ -153,9 +160,11 @@ public actual interface KProperty1<T, out V> : KProperty<V>, (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<T, V>
|
||||
|
||||
/**
|
||||
@@ -169,7 +178,7 @@ public actual interface KProperty1<T, out V> : KProperty<V>, (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<T, V> : KProperty1<T, V>, KMutableProperty<V> {
|
||||
/**
|
||||
* Modifies the value of the property.
|
||||
@@ -181,6 +190,7 @@ public actual interface KMutableProperty1<T, V> : KProperty1<T, V>, 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<T, V>
|
||||
|
||||
/**
|
||||
@@ -202,7 +212,7 @@ public actual interface KMutableProperty1<T, V> : KProperty1<T, V>, 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<D, E, out V> : KProperty<V>, (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<D, E, out V> : KProperty<V>, (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<D, E, V>
|
||||
|
||||
/**
|
||||
@@ -243,7 +255,7 @@ public actual interface KProperty2<D, E, out V> : KProperty<V>, (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<D, E, V> : KProperty2<D, E, V>, KMutableProperty<V> {
|
||||
/**
|
||||
* Modifies the value of the property.
|
||||
@@ -254,6 +266,7 @@ public actual interface KMutableProperty2<D, E, V> : KProperty2<D, E, V>, 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<D, E, V>
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user