[FIR] Add VOLATILE_ON_VALUE/VOLATILE_ON_DELEGATE diagnostic

This commit is contained in:
Andrey Zinovyev
2021-08-17 14:00:35 +03:00
committed by TeamCityServer
parent f90b534c4c
commit 7ba8e0d9cc
10 changed files with 87 additions and 13 deletions
@@ -1,13 +0,0 @@
// !DIAGNOSTICS: -UNUSED_ANONYMOUS_PARAMETER
import kotlin.jvm.Volatile
import kotlin.properties.Delegates
class My {
@Volatile val x = 0
// ok
@Volatile var y = 1
@delegate:Volatile var z: String by Delegates.observable("?") { prop, old, new -> old.hashCode() }
@field:Volatile val w = 2
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_ANONYMOUS_PARAMETER
import kotlin.jvm.Volatile
import kotlin.properties.Delegates