[JS IR] support per-module in the new Ir2JS
This commit is contained in:
committed by
TeamCityServer
parent
1f55dc73d2
commit
0506d422a3
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user