Skip to content

Commit 38909c7

Browse files
authored
Fixed visibility of atomic properties, they are required to be private or internal (#3808)
The new atomicfu JVM compiler plugin (since 1.9.20) will explicitly require atomic properties to be private or internal (or to be members of private or internal classes). See: Kotlin/kotlinx-atomicfu#322 YT issue: KT-60528
1 parent 4cfd88a commit 38909c7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

kotlinx-coroutines-core/concurrent/test/LimitedParallelismConcurrentTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class LimitedParallelismConcurrentTest : TestBase() {
6868
@Test
6969
fun testNotDoingDispatchesWhenNoTasksArePresent() = runTest {
7070
class NaggingDispatcher: CoroutineDispatcher() {
71-
val closed = atomic(false)
71+
private val closed = atomic(false)
7272
override fun dispatch(context: CoroutineContext, block: Runnable) {
7373
if (closed.value)
7474
fail("Dispatcher was closed, but still dispatched a task")

kotlinx-coroutines-core/concurrent/test/MultithreadedDispatcherStressTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import kotlin.coroutines.*
99
import kotlin.test.*
1010

1111
class MultithreadedDispatcherStressTest {
12-
val shared = atomic(0)
12+
private val shared = atomic(0)
1313

1414
/**
1515
* Tests that [newFixedThreadPoolContext] will not drop tasks when closed.

kotlinx-coroutines-core/jvm/test/JobHandlersUpgradeStressTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class JobHandlersUpgradeStressTest : TestBase() {
2929
@Volatile
3030
private var job: Job? = null
3131

32-
class State {
32+
internal class State {
3333
val state = atomic(0)
3434
}
3535

0 commit comments

Comments
 (0)