Load module annotations for JVM and JS modules in compiler

#KT-22759 In Progress
This commit is contained in:
Alexander Udalov
2018-01-23 13:33:47 +01:00
parent 396a5ab352
commit 890374a42a
21 changed files with 478 additions and 211 deletions
@@ -0,0 +1,8 @@
package lib
@Experimental
annotation class ExperimentalAPI
class Foo
fun bar() {}
@@ -0,0 +1,7 @@
compiler/testData/experimental/jvmExperimentalModule/usage.kt:5:15: error: this declaration is experimental and its usage must be marked with '@lib.ExperimentalAPI'
fun fail(foo: Foo) {
^
compiler/testData/experimental/jvmExperimentalModule/usage.kt:6:5: error: this declaration is experimental and its usage must be marked with '@lib.ExperimentalAPI'
bar()
^
COMPILATION_ERROR
@@ -0,0 +1,12 @@
package usage
import lib.*
fun fail(foo: Foo) {
bar()
}
@ExperimentalAPI
fun ok(foo: Foo) {
bar()
}