Experimental fixes: introduce "Add @UseExperimental" #KT-22760 Fixed
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user