15 lines
406 B
Kotlin
Vendored
15 lines
406 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// !DIAGNOSTICS: -UNUSED_ANONYMOUS_PARAMETER
|
|
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
|
|
}
|