f79607d32d
@JsExport is only allowed on top-level functions in K/Wasm Restrictions for nested function are handled by reusing K/JS diagnostics Restrictions for classes and properties are handled by specifying annotation target in stdlib
26 lines
394 B
Kotlin
Vendored
26 lines
394 B
Kotlin
Vendored
// !OPT_IN: kotlin.js.ExperimentalJsExport
|
|
|
|
@JsExport
|
|
fun foo1() {
|
|
}
|
|
|
|
class C {
|
|
<!NESTED_JS_EXPORT!>@JsExport<!>
|
|
fun memberFunction() {
|
|
}
|
|
}
|
|
|
|
fun foo2() {
|
|
<!NESTED_JS_EXPORT!>@JsExport<!>
|
|
fun localFun() {
|
|
}
|
|
}
|
|
|
|
val p1 = (<!NESTED_JS_EXPORT!>@JsExport<!> fun () {})
|
|
|
|
<!WRONG_ANNOTATION_TARGET!>@JsExport<!>
|
|
class C2
|
|
|
|
<!WRONG_ANNOTATION_TARGET!>@JsExport<!>
|
|
var p2: Int = 1
|