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:
@@ -28,4 +28,6 @@ package kotlin
|
||||
@Suppress("NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS")
|
||||
@SinceKotlin("1.3") public actual typealias ConcurrentModificationException = java.util.ConcurrentModificationException
|
||||
|
||||
@OptIn(ExperimentalMultiplatform::class)
|
||||
@AllowDifferentMembersInActual // New 'reversed', 'thenComparing', etc. members are added compared to the expect declaration
|
||||
@SinceKotlin("1.1") public actual typealias Comparator<T> = java.util.Comparator<T>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
package kotlin.text
|
||||
|
||||
@OptIn(ExperimentalMultiplatform::class)
|
||||
@AllowDifferentMembersInActual // New 'append' members are added compared to the expect declaration
|
||||
@SinceKotlin("1.1") public actual typealias Appendable = java.lang.Appendable
|
||||
|
||||
@Suppress("ACTUAL_WITHOUT_EXPECT") // TODO: some supertypes are missing
|
||||
|
||||
Reference in New Issue
Block a user