[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
@@ -3,7 +3,10 @@
// PROPERTY_LAZY_INITIALIZATION
// FILE: A.kt
var result: String? = null
val a = "a".let {
result = "OK"
it + "a"
}
@@ -13,5 +16,5 @@ fun foo() =
// FILE: main.kt
fun box(): String {
val foo = foo()
return if (js("typeof a") == "string" && js("a") == "aa") "OK" else "fail"
return result!!
}