summaryrefslogtreecommitdiff
path: root/plugins/kotlin/idea/tests/testData/quickfix/experimental/reservedKeywordPackage2.test
blob: de51a65cb4e27e47b49224619ab9a867ffd3c3e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// FILE: first.before.kt
// "Propagate 'Ann' opt-in requirement to 'test'" "true"
// COMPILER_ARGUMENTS: -opt-in=kotlin.RequiresOptIn
// WITH_RUNTIME
// ERROR: This declaration needs opt-in. Its usage must be marked with '@fun.optin.Ann' or '@OptIn(fun.optin.Ann::class)'
import `fun`.optin.C

fun test(c: C<caret>) {
}


// FILE: second.kt
package `fun`.optin

@RequiresOptIn
annotation class Ann

@Ann
class C


// FILE: first.after.kt
// "Propagate 'Ann' opt-in requirement to 'test'" "true"
// COMPILER_ARGUMENTS: -opt-in=kotlin.RequiresOptIn
// WITH_RUNTIME
// ERROR: This declaration needs opt-in. Its usage must be marked with '@fun.optin.Ann' or '@OptIn(fun.optin.Ann::class)'
import `fun`.optin.Ann
import `fun`.optin.C

@Ann
fun test(c: C<caret>) {
}