[JS IR] Update an error on cross-module symbol redeclaration

The temporary solution for KT-50546.

The complete solution requires the understanding,
whether a cross-module symbol redeclaration is a valid case or not.
If the case is valid, the linker symbol table logic must be reworked.
This commit is contained in:
Alexander Korepanov
2021-12-28 14:42:03 +03:00
committed by Space
parent a153a1fefb
commit 4a29a8a7af
4 changed files with 40 additions and 1 deletions
@@ -0,0 +1,24 @@
// IGNORE_BACKEND: JS_IR
// MODULE: AT
// FILE: at.kt
package foo
fun redeclaredFunction(): String = "OK"
// MODULE: A(AT)
// FILE: a.kt
package foo
fun userFunction(): String = redeclaredFunction()
// MODULE: main(A)
// FILE: main.kt
package foo
fun redeclaredFunction(): String = "Fail"
fun box(): String {
assertEquals(redeclaredFunction(), "Fail")
return userFunction()
}