mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 08:31:28 +00:00
12 lines
343 B
Kotlin
Vendored
12 lines
343 B
Kotlin
Vendored
import kotlin.jvm.Volatile
|
|
import kotlin.properties.Delegates
|
|
|
|
class My {
|
|
<!VOLATILE_ON_VALUE!>@Volatile<!> val x = 0
|
|
// ok
|
|
@Volatile var y = 1
|
|
|
|
<!VOLATILE_ON_DELEGATE!>@delegate:Volatile<!> var z: String by Delegates.observable("?") { prop, old, new -> old.hashCode() }
|
|
|
|
<!VOLATILE_ON_VALUE!>@field:Volatile<!> val w = 2
|
|
} |