rra/ilgonmic/duplicated-import-names

[JS IR] Add tests with external funs and global vals

[JS IR] Non module cases are exceptions for naming

[JS IR] Use fqn for jsModule on declaration

[JS IR] Add test on same external names

Merge-request: KT-MR-5901
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>

^KT-51438 fixed
This commit is contained in:
Ilya Goncharov
2022-03-14 14:04:27 +00:00
committed by Space
parent a471ddf059
commit 0463b5ec3c
6 changed files with 123 additions and 968 deletions
@@ -0,0 +1,47 @@
$kotlin_test_internal$.beginModule();
function A(x) {
this.x = x;
}
module.exports = A;
$kotlin_test_internal$.endModule("foo1");
$kotlin_test_internal$.beginModule();
module.exports = function () {
return 38
};
$kotlin_test_internal$.endModule("foo2");
$kotlin_test_internal$.beginModule();
module.exports = 39
$kotlin_test_internal$.endModule("foo3");
$kotlin_test_internal$.beginModule();
function B(x) {
this.x = x;
}
module.exports = B
$kotlin_test_internal$.endModule("bar1");
$kotlin_test_internal$.beginModule();
module.exports = function () {
return 83
};
$kotlin_test_internal$.endModule("bar2");
$kotlin_test_internal$.beginModule();
module.exports = 93
$kotlin_test_internal$.endModule("bar3");