[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:
Nikita Bobko
2023-10-18 10:56:37 +02:00
committed by Space Team
parent 8b03636b3b
commit 14029b0ebc
24 changed files with 91 additions and 77 deletions
@@ -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<out R> : KAnnotatedElement {
/**
* The name of this callable as it was declared in the source code.
@@ -26,5 +29,6 @@ public actual interface KCallable<out R> : 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
}
@@ -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<T : Any> : KDeclarationContainer, KAnnotatedElement, KClassifier {
/**
* The simple name of the class as it was declared in the source code,