Load module annotations for JVM and JS modules in compiler
#KT-22759 In Progress
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package lib
|
||||
|
||||
@Experimental
|
||||
annotation class ExperimentalAPI
|
||||
|
||||
class Foo
|
||||
|
||||
fun bar() {}
|
||||
@@ -0,0 +1,7 @@
|
||||
compiler/testData/experimental/jsExperimentalModule/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/jsExperimentalModule/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()
|
||||
}
|
||||
Reference in New Issue
Block a user