Experimental fixes: introduce "add annotation" (KT-22760)

This commit is contained in:
Mikhail Glukhikh
2018-05-04 15:45:43 +03:00
parent 721d9df4e0
commit f404d6c97a
15 changed files with 266 additions and 22 deletions
@@ -0,0 +1,21 @@
// "Add '@MyExperimentalAPI' annotation to 'bar'" "false"
// COMPILER_ARGUMENTS: -Xuse-experimental=kotlin.Experimental
// WITH_RUNTIME
// ACTION: Add '@MyExperimentalAPI' annotation to containing class 'Bar'
// ERROR: This declaration is experimental and its usage must be marked with '@MyExperimentalAPI' or '@UseExperimental(MyExperimentalAPI::class)'
// ERROR: This declaration is experimental and its usage must be marked with '@MyExperimentalAPI' or '@UseExperimental(MyExperimentalAPI::class)'
@Experimental
@Target(AnnotationTarget.CLASS)
annotation class MyExperimentalAPI
@MyExperimentalAPI
class Some {
fun foo() {}
}
class Bar {
fun bar() {
Some().foo<caret>()
}
}