Experimental fixes: additional tests, handle local declarations

This commit is contained in:
Mikhail Glukhikh
2018-05-23 18:21:18 +03:00
parent 51fba03253
commit a76bb80e4d
7 changed files with 125 additions and 17 deletions
+23
View File
@@ -0,0 +1,23 @@
// "Add '@MyExperimentalAPI' annotation to containing class 'Outer'" "false"
// COMPILER_ARGUMENTS: -Xuse-experimental=kotlin.Experimental
// WITH_RUNTIME
// ACTION: Add '@MyExperimentalAPI' annotation to 'bar'
// ACTION: Add '@MyExperimentalAPI' annotation to containing class 'Inner'
// ACTION: Add '@UseExperimental(MyExperimentalAPI::class)' annotation to 'bar'
// ERROR: This declaration is experimental and its usage must be marked with '@MyExperimentalAPI' or '@UseExperimental(MyExperimentalAPI::class)'
@Experimental
annotation class MyExperimentalAPI
@MyExperimentalAPI
fun foo() {}
class Outer {
class Bar {
class Inner {
fun bar() {
foo<caret>()
}
}
}
}