Experimental fixes: introduce "Add @UseExperimental" #KT-22760 Fixed

This commit is contained in:
Mikhail Glukhikh
2018-05-08 14:59:01 +03:00
parent f404d6c97a
commit 51fba03253
10 changed files with 121 additions and 10 deletions
@@ -0,0 +1,21 @@
// "Add '@UseExperimental(MyExperimentalAPI::class)' annotation to 'bar'" "true"
// COMPILER_ARGUMENTS: -Xuse-experimental=kotlin.Experimental
// WITH_RUNTIME
package a.b
@Experimental
@Target(AnnotationTarget.CLASS)
annotation class MyExperimentalAPI
@MyExperimentalAPI
class Some {
fun foo() {}
}
class Bar {
@UseExperimental(MyExperimentalAPI::class)
fun bar() {
Some().foo()
}
}