[JS FIR] Support JS module system FE diagnostics

Support CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM diagnostic
^KT-59377 Fixed

Support CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM diagnostic
^KT-59381 Fixed

Support CALL_FROM_UMD_MUST_BE_JS_MODULE_AND_JS_NON_MODULE diagnostic
^KT-59417 Fixed
This commit is contained in:
Alexander Korepanov
2023-07-13 15:30:04 +02:00
committed by Space Team
parent 30b012839c
commit 08d158f901
24 changed files with 319 additions and 169 deletions
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// MODULE: m1
// FILE: a.kt
package foo
@@ -52,10 +53,13 @@ fun box() {
println(<!CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM!>B::class<!>)
println(<!CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM!>B.Nested::class<!>)
val x: Any = 1
println(x is B)
}
external class DerivedB : <!CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM!>B<!>
inline fun <reified T> boo(x: T) {
println("${T::class.simpleName}: $x")
}
}