[JS IR] support per-module in the new Ir2JS

This commit is contained in:
Anton Bannykh
2021-10-25 13:20:39 +03:00
committed by TeamCityServer
parent 1f55dc73d2
commit 0506d422a3
8 changed files with 463 additions and 246 deletions
@@ -20,6 +20,10 @@ inline fun buzz(): Int {
return o.f()
}
fun overloadedFun(i: Int) = i + 1
fun overloadedFun(s: String) = s + "!"
// FILE: lib.js
function bar() {
@@ -47,5 +51,11 @@ fun box(): String {
val e = lib.callFoo()
if (e != 23) return "fail: inline function calling another function: $e"
val f = lib.overloadedFun(1)
if (f != 2) return "fail: overloadedFun(Int): $f"
val g = lib.overloadedFun("A")
if (g != "A!") return "fail: overloadedFun(String): $f"
return "OK"
}