[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:
committed by
Space
parent
a153a1fefb
commit
4a29a8a7af
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user