KT-55268 Make k.c.Volatile stable
This commit is contained in:
committed by
Space Team
parent
2dbff89098
commit
b8da3e69ce
@@ -1,6 +1,5 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
|
||||
// !API_VERSION: 1.9
|
||||
// WITH_STDLIB
|
||||
// FULL_JDK
|
||||
|
||||
@@ -13,7 +12,6 @@ class CustomDelegate {
|
||||
|
||||
class C {
|
||||
@Volatile var vol = 1
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
@kotlin.concurrent.Volatile var vol2 = 1
|
||||
@Transient val tra = 1
|
||||
@delegate:Transient val del: String by CustomDelegate()
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
// !API_VERSION: 1.9
|
||||
@Volatile var vol = 1
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
@kotlin.concurrent.Volatile var vol2 = 1
|
||||
@Transient val tra = 1
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_ANONYMOUS_PARAMETER
|
||||
// !API_VERSION: 1.9
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
|
||||
// MODULE: common
|
||||
@@ -9,7 +8,6 @@
|
||||
import kotlin.concurrent.Volatile
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
class ConcurrentVolatile {
|
||||
<!VOLATILE_ON_VALUE!>@Volatile<!> val x = 0
|
||||
// ok
|
||||
@@ -32,7 +30,6 @@ import kotlin.jvm.Volatile as JvmVolatile
|
||||
import kotlin.concurrent.Volatile
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
@OptIn(ExperimentalStdlibApi::class)
|
||||
class ConcurrentVolatileOnJvm {
|
||||
<!VOLATILE_ON_VALUE!>@Volatile<!> val x = 0
|
||||
// ok
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// -- Module: <common> --
|
||||
package
|
||||
|
||||
@kotlin.OptIn(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final class ConcurrentVolatile {
|
||||
public final class ConcurrentVolatile {
|
||||
public constructor ConcurrentVolatile()
|
||||
@field:kotlin.concurrent.Volatile public final var noBacking: kotlin.String
|
||||
@field:kotlin.concurrent.Volatile public final val w: kotlin.Int = 2
|
||||
@@ -16,7 +16,7 @@ package
|
||||
// -- Module: <jvm> --
|
||||
package
|
||||
|
||||
@kotlin.OptIn(markerClass = {kotlin.ExperimentalStdlibApi::class}) public final class ConcurrentVolatileOnJvm {
|
||||
public final class ConcurrentVolatileOnJvm {
|
||||
public constructor ConcurrentVolatileOnJvm()
|
||||
@field:kotlin.concurrent.Volatile /* = kotlin.jvm.Volatile */ public final var noBacking: kotlin.String
|
||||
@field:kotlin.concurrent.Volatile /* = kotlin.jvm.Volatile */ public final val w: kotlin.Int = 2
|
||||
|
||||
@@ -21,7 +21,7 @@ import kotlin.internal.RequireKotlinVersionKind
|
||||
@Target(AnnotationTarget.FIELD)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@MustBeDocumented
|
||||
@SinceKotlin("1.8")
|
||||
@SinceKotlin("1.9")
|
||||
@RequireKotlin(version = "1.8.20", versionKind = RequireKotlinVersionKind.COMPILER_VERSION)
|
||||
@ExperimentalStdlibApi
|
||||
@WasExperimental(ExperimentalStdlibApi::class)
|
||||
public actual annotation class Volatile
|
||||
@@ -14,7 +14,5 @@ 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.
|
||||
*/
|
||||
@Suppress("NEWER_VERSION_IN_SINCE_KOTLIN")
|
||||
@SinceKotlin("1.9")
|
||||
@ExperimentalStdlibApi
|
||||
public actual typealias Volatile = kotlin.jvm.Volatile
|
||||
@@ -24,8 +24,6 @@ import kotlin.internal.RequireKotlinVersionKind
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
@MustBeDocumented
|
||||
@OptionalExpectation
|
||||
@Suppress("NEWER_VERSION_IN_SINCE_KOTLIN")
|
||||
@SinceKotlin("1.9")
|
||||
@RequireKotlin(version = "1.8.20", versionKind = RequireKotlinVersionKind.COMPILER_VERSION)
|
||||
@ExperimentalStdlibApi
|
||||
public expect annotation class Volatile()
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
package kotlin.enums
|
||||
|
||||
import kotlin.jvm.Volatile
|
||||
|
||||
/**
|
||||
* A specialized immutable implementation of [List] interface that
|
||||
* contains all enum entries of the specified enum type [E].
|
||||
|
||||
Reference in New Issue
Block a user