[Wasm] Fix external functions import clashing

This commit is contained in:
Igor Yakovlev
2022-12-19 22:49:44 +01:00
committed by teamcity
parent 35340f2f04
commit fc80104d55
5 changed files with 42 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
// IGNORE_BACKEND: JS_IR, JS
// FILE: file1.kt
@JsFun("() => 42")
private external fun clashName(): Int
public fun getClashName1(): Int = clashName()
// FILE: file2.kt
@JsFun("() => 24")
private external fun clashName(): Int
public fun getClashName2(): Int = clashName()
fun box(): String {
if (getClashName1() != 42) return "Error1"
if (getClashName2() != 24) return "Error2"
return "OK"
}