Skip to content

Commit dbdcd85

Browse files
authored
Fix expect/actual mismatched member scope for open expect compilation errors (#329)
Those are compilation errors introduced in Kotlin 1.9.20 in scope of https://youtrack.jetbrains.com/issue/KT-22841
1 parent 75667aa commit dbdcd85

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

atomicfu/src/nativeMain/kotlin/kotlinx/atomicfu/locks/Synchronized.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@ import kotlin.concurrent.AtomicReference
1111
import kotlin.native.SharedImmutable
1212
import kotlin.native.concurrent.*
1313

14+
// fixme replace the suppress with AllowDifferentMembersInActual once stdlib is updated to 1.9.20 https://github.com/Kotlin/kotlinx-atomicfu/issues/333
15+
@Suppress("ACTUAL_CLASSIFIER_MUST_HAVE_THE_SAME_MEMBERS_AS_NON_FINAL_EXPECT_CLASSIFIER")
1416
public actual open class SynchronizedObject {
1517

18+
// fixme replace the suppress with AllowDifferentMembersInActual once stdlib is updated to 1.9.20 https://github.com/Kotlin/kotlinx-atomicfu/issues/333
19+
@Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION")
1620
protected val lock = AtomicReference(LockState(UNLOCKED, 0, 0))
1721

22+
// fixme replace the suppress with AllowDifferentMembersInActual once stdlib is updated to 1.9.20 https://github.com/Kotlin/kotlinx-atomicfu/issues/333
23+
@Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION")
1824
public fun lock() {
1925
val currentThreadId = pthread_self()!!
2026
while (true) {
@@ -66,6 +72,8 @@ public actual open class SynchronizedObject {
6672
}
6773
}
6874

75+
// fixme replace the suppress with AllowDifferentMembersInActual once stdlib is updated to 1.9.20 https://github.com/Kotlin/kotlinx-atomicfu/issues/333
76+
@Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION")
6977
public fun tryLock(): Boolean {
7078
val currentThreadId = pthread_self()!!
7179
while (true) {
@@ -86,6 +94,8 @@ public actual open class SynchronizedObject {
8694
}
8795
}
8896

97+
// fixme replace the suppress with AllowDifferentMembersInActual once stdlib is updated to 1.9.20 https://github.com/Kotlin/kotlinx-atomicfu/issues/333
98+
@Suppress("NON_ACTUAL_MEMBER_DECLARED_IN_EXPECT_NON_FINAL_CLASSIFIER_ACTUALIZATION")
8999
public fun unlock() {
90100
val currentThreadId = pthread_self()!!
91101
while (true) {

0 commit comments

Comments
 (0)