[K/JS] Add ability to exclude declarations from export by a new annotation @JsExport.Ignore.
This commit is contained in:
@@ -13,7 +13,10 @@ package a
|
||||
expect annotation class A(val x: Int)
|
||||
|
||||
@OptionalExpectation
|
||||
expect annotation class B(val s: String)
|
||||
expect annotation class B(val s: String) {
|
||||
@OptionalExpectation
|
||||
annotation class C(val a: Boolean)
|
||||
}
|
||||
|
||||
// FILE: actual.kt
|
||||
|
||||
@@ -33,6 +36,7 @@ import a.B
|
||||
|
||||
@A(42)
|
||||
@B("OK")
|
||||
@B.C(true)
|
||||
fun box(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ annotation class InOtherAnnotation(val a: A)
|
||||
fun useInOtherAnnotation() {}
|
||||
|
||||
|
||||
|
||||
expect class C {
|
||||
@OptionalExpectation
|
||||
annotation class Nested
|
||||
|
||||
@@ -16,9 +16,6 @@ annotation class InOtherAnnotation(val a: A)
|
||||
compiler/testData/multiplatform/optionalExpectationIncorrectUse/common.kt:19:20: error: declaration annotated with '@OptionalExpectation' can only be used inside an annotation entry
|
||||
@InOtherAnnotation(A())
|
||||
^
|
||||
compiler/testData/multiplatform/optionalExpectationIncorrectUse/common.kt:25:5: error: '@OptionalExpectation' cannot be used on a nested class
|
||||
@OptionalExpectation
|
||||
^
|
||||
|
||||
-- JVM --
|
||||
Exit code: COMPILATION_ERROR
|
||||
@@ -41,9 +38,6 @@ annotation class InOtherAnnotation(val a: A)
|
||||
compiler/testData/multiplatform/optionalExpectationIncorrectUse/common.kt:19:20: error: declaration annotated with '@OptionalExpectation' can only be used inside an annotation entry
|
||||
@InOtherAnnotation(A())
|
||||
^
|
||||
compiler/testData/multiplatform/optionalExpectationIncorrectUse/common.kt:25:5: error: '@OptionalExpectation' cannot be used on a nested class
|
||||
@OptionalExpectation
|
||||
^
|
||||
compiler/testData/multiplatform/optionalExpectationIncorrectUse/jvm.kt:1:24: error: declaration annotated with '@OptionalExpectation' can only be used inside an annotation entry
|
||||
fun useInReturnType(): A? = null
|
||||
^
|
||||
|
||||
Reference in New Issue
Block a user