[Wasm] Add @JsFun diagnostics (KT-56944)

JsFun target should be top-level external function
This commit is contained in:
Svyatoslav Kuzmich
2023-02-20 14:30:52 +01:00
committed by Space Team
parent 1da96213ca
commit 4be2f53b47
6 changed files with 67 additions and 0 deletions
@@ -0,0 +1,15 @@
@JsFun("() => {}")
external fun topLevelExternalFun(): Unit
external class ExternalClass {
<!WRONG_JS_FUN_TARGET!>@JsFun("() => {}")<!>
fun memberFun(): Unit
}
<!WRONG_JS_FUN_TARGET!>@JsFun("() => {}")<!>
fun topLevelNonExternalFun(): Unit {}
class NonExternalClass {
<!WRONG_JS_FUN_TARGET!>@JsFun("() => {}")<!>
fun memberFun(): Unit {}
}