FIR: add EXPERIMENTAL_API_USAGE reporting

This commit is contained in:
Mikhail Glukhikh
2021-07-08 15:50:53 +03:00
parent 3235b09a92
commit 82f268d611
81 changed files with 520 additions and 650 deletions
@@ -0,0 +1,24 @@
// FIR_IDENTICAL
// !USE_EXPERIMENTAL: kotlin.RequiresOptIn
@RequiresOptIn
@Retention(AnnotationRetention.BINARY)
annotation class E
@set:E
var x: Int = 42
@E
var y: Int = 24
var z: Int = 44
@E set(arg) {
field = arg
}
fun user(): Int {
<!EXPERIMENTAL_API_USAGE_ERROR!>x<!> = 10
<!EXPERIMENTAL_API_USAGE_ERROR!>y<!> = 5
<!EXPERIMENTAL_API_USAGE_ERROR!>x<!> = 15
return x + <!EXPERIMENTAL_API_USAGE_ERROR!>y<!> + z
}