summaryrefslogtreecommitdiff
path: root/plugins/kotlin/idea/tests/testData/quickfix/experimental/reservedKeywordPackage.test
blob: 4fad1fef7170444dd0b02d1faf1ebd96f72a2684 (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
// "Opt in for 'Ann' on '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
// "Opt in for 'Ann' on '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

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