[JS IR] Support per-file mode and ES modules

This commit is contained in:
Svyatoslav Kuzmich
2021-02-23 15:44:06 +03:00
parent f479ac5c3a
commit 3f8dce4b53
140 changed files with 5136 additions and 609 deletions
@@ -0,0 +1,16 @@
// DONT_TARGET_EXACT_BACKEND: JS
// ES_MODULES
package foo
@JsModule("./externalObject.mjs")
external object A {
val x: Int = definedExternally
fun foo(y: Int): Int = definedExternally
}
fun box(): String {
assertEquals(23, A.x)
assertEquals(65, A.foo(42))
return "OK"
}