Make k.c.Volatile since 1.9 in JVM and Common KT-55268, KT-55609
Leave it experimental since 1.8 for K/Native.
This commit is contained in:
committed by
Space Team
parent
f7940a2d46
commit
916f733f73
@@ -1,5 +1,6 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// !API_VERSION: 1.9
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// !API_VERSION: 1.9
|
||||
@Volatile var vol = 1
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
@kotlin.concurrent.Volatile var vol2 = 1
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_ANONYMOUS_PARAMETER
|
||||
// !API_VERSION: 1.9
|
||||
import kotlin.jvm.Volatile as JvmVolatile
|
||||
import kotlin.concurrent.Volatile
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
@@ -14,6 +14,7 @@ package kotlin.concurrent
|
||||
* For example, if the property getter or setter make several operations with the backing field,
|
||||
* a _property_ operation, i.e. reading or setting it through these accessors, is not guaranteed to be atomic.
|
||||
*/
|
||||
@SinceKotlin("1.8")
|
||||
@Suppress("NEWER_VERSION_IN_SINCE_KOTLIN")
|
||||
@SinceKotlin("1.9")
|
||||
@ExperimentalStdlibApi
|
||||
public actual typealias Volatile = kotlin.jvm.Volatile
|
||||
@@ -24,7 +24,8 @@ import kotlin.internal.RequireKotlinVersionKind
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@MustBeDocumented
|
||||
@OptionalExpectation
|
||||
@SinceKotlin("1.8")
|
||||
@Suppress("NEWER_VERSION_IN_SINCE_KOTLIN")
|
||||
@SinceKotlin("1.9")
|
||||
@RequireKotlin(version = "1.8.20", versionKind = RequireKotlinVersionKind.COMPILER_VERSION)
|
||||
@ExperimentalStdlibApi
|
||||
public expect annotation class Volatile()
|
||||
Reference in New Issue
Block a user