JS BE: expose imported modules via $$importsForInline$$ property

... and use it as prefix to FQN in inline functions. This allows
to properly inline function declared in module A to module B,
when this function calls another function in module C.

See KT-18201
This commit is contained in:
Alexey Andreev
2017-05-31 17:49:25 +03:00
parent 978661c53d
commit 1df6f2f9a0
13 changed files with 346 additions and 50 deletions
@@ -821,6 +821,30 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
doTest(fileName);
}
@TestMetadata("inlineJsModule.kt")
public void testInlineJsModule() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineJsModule.kt");
doTest(fileName);
}
@TestMetadata("inlineJsModulePackage.kt")
public void testInlineJsModulePackage() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineJsModulePackage.kt");
doTest(fileName);
}
@TestMetadata("inlineModule.kt")
public void testInlineModule() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineModule.kt");
doTest(fileName);
}
@TestMetadata("inlineModuleNonIndentifier.kt")
public void testInlineModuleNonIndentifier() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/inlineModuleNonIndentifier.kt");
doTest(fileName);
}
@TestMetadata("lambda.kt")
public void testLambda() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/crossModuleRef/lambda.kt");
@@ -3497,6 +3521,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
doTest(fileName);
}
@TestMetadata("multipleReimport.kt")
public void testMultipleReimport() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/multipleReimport.kt");
doTest(fileName);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/incremental/simple.kt");