K1: Implement a checker that disallows to have different member scopes for expect open and its actual
^KT-22841 Fixed Review: https://jetbrains.team/p/kt/reviews/11603/timeline The commit also introduces `@AllowDifferentMembersInActual` annotation in stdlib which allows to suppress the diagnostic
This commit is contained in:
@@ -10,6 +10,7 @@ package kotlin.reflect
|
||||
*
|
||||
* @param R return type of the callable.
|
||||
*/
|
||||
@AllowDifferentMembersInActual // New 'KAnnotatedElement` supertype is added compared to the expect declaration
|
||||
public actual interface KCallable<out R> : KAnnotatedElement {
|
||||
/**
|
||||
* The name of this callable as it was declared in the source code.
|
||||
|
||||
@@ -13,6 +13,7 @@ package kotlin.reflect
|
||||
*
|
||||
* @param T the type of the class.
|
||||
*/
|
||||
@AllowDifferentMembersInActual // New 'KDeclarationContainer', 'KAnnotatedElement` supertypes are added compared to the expect declaration
|
||||
public actual interface KClass<T : Any> : KDeclarationContainer, KAnnotatedElement, KClassifier {
|
||||
/**
|
||||
* The simple name of the class as it was declared in the source code,
|
||||
@@ -43,7 +44,7 @@ public actual interface KClass<T : Any> : KDeclarationContainer, KAnnotatedEleme
|
||||
* For example, on JVM, [KClass] instances for a primitive type (`int`) and the corresponding wrapper type (`java.lang.Integer`)
|
||||
* are considered equal, because they have the same fully qualified name "kotlin.Int".
|
||||
*/
|
||||
override fun equals(other: Any?): Boolean
|
||||
actual override fun equals(other: Any?): Boolean // KT-24971
|
||||
|
||||
override fun hashCode(): Int
|
||||
actual override fun hashCode(): Int // KT-24971
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user