Skip to content

Commit 7cd3a0e

Browse files
authored
Add a workaround for incremental compilation bug (#4114)
See KT-66317
1 parent 7353c11 commit 7cd3a0e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

kotlinx-coroutines-core/jvm/src/internal/Concurrent.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ internal actual inline fun <T> ReentrantLock.withLock(action: () -> T) = this.wi
1313
@Suppress("ACTUAL_WITHOUT_EXPECT") // Visibility
1414
internal actual typealias WorkaroundAtomicReference<T> = java.util.concurrent.atomic.AtomicReference<T>
1515

16+
// BenignDataRace is OptionalExpectation and doesn't have to be here
17+
// but then IC breaks. See KT-66317
18+
@Retention(AnnotationRetention.SOURCE)
19+
@Target(AnnotationTarget.FIELD)
20+
internal actual annotation class BenignDataRace()
21+
1622
@Suppress("NOTHING_TO_INLINE") // So that R8 can completely remove ConcurrentKt class
1723
internal actual inline fun <E> identitySet(expectedSize: Int): MutableSet<E> =
1824
Collections.newSetFromMap(IdentityHashMap(expectedSize))

0 commit comments

Comments
 (0)