Files
Joffrey.Bion e28ba1aaa8 [amper][kotlin] Better user-visible name for module-wide opt-in quickfix
GitOrigin-RevId: b5f5b51055439c35b92dd3bb9f7cbc3556d3615f
2024-05-04 23:13:27 +00:00

29 lines
989 B
Kotlin

// "Propagate 'MyExperimentalAPI' opt-in requirement to containing class 'Outer'" "false"
// IGNORE_K2
// COMPILER_ARGUMENTS: -opt-in=kotlin.RequiresOptIn
// WITH_STDLIB
// ACTION: Introduce import alias
// ACTION: Opt in for 'MyExperimentalAPI' in containing file 'nestedClasses.kt'
// ACTION: Opt in for 'MyExperimentalAPI' in module 'light_idea_test_case'
// ACTION: Opt in for 'MyExperimentalAPI' on 'bar'
// ACTION: Opt in for 'MyExperimentalAPI' on containing class 'Inner'
// ACTION: Propagate 'MyExperimentalAPI' opt-in requirement to 'bar'
// ACTION: Propagate 'MyExperimentalAPI' opt-in requirement to containing class 'Inner'
// ERROR: This declaration needs opt-in. Its usage must be marked with '@MyExperimentalAPI' or '@OptIn(MyExperimentalAPI::class)'
@RequiresOptIn
annotation class MyExperimentalAPI
@MyExperimentalAPI
fun foo() {}
class Outer {
class Bar {
class Inner {
fun bar() {
foo<caret>()
}
}
}
}