JS: prevent compiler from importing module more than once if not necessary. See KT-15260
This commit is contained in:
committed by
Alexey Andreev
parent
1ecd957981
commit
9b4b7960d3
@@ -0,0 +1,17 @@
|
||||
// MODULE_KIND: COMMON_JS
|
||||
// FUNCTION_CALLED_TIMES: require count=2
|
||||
|
||||
@JsModule("lib")
|
||||
external fun f(x: Int): String
|
||||
|
||||
@JsModule("lib")
|
||||
external fun f(x: String): String
|
||||
|
||||
@JsModule("lib")
|
||||
external fun g(x: Boolean): String
|
||||
|
||||
fun box(): String {
|
||||
val result = f(23) + f("foo") + g(true)
|
||||
if (result != "abc") return "fail: $result"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user