[JS] Add test for KT-39378

This commit is contained in:
Roman Artemev
2020-09-02 13:46:15 +03:00
parent 3d5ec8aa10
commit 2612609664
5 changed files with 54 additions and 0 deletions
@@ -5237,6 +5237,11 @@ public class IrBoxJsES6TestGenerated extends AbstractIrBoxJsES6Test {
runTest("js/js.translator/testData/box/jsModule/interfaces.kt");
}
@TestMetadata("kt39378.kt")
public void testKt39378() throws Exception {
runTest("js/js.translator/testData/box/jsModule/kt39378.kt");
}
@TestMetadata("topLevelVarargFun.kt")
public void testTopLevelVarargFun() throws Exception {
runTest("js/js.translator/testData/box/jsModule/topLevelVarargFun.kt");
@@ -5237,6 +5237,11 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
runTest("js/js.translator/testData/box/jsModule/interfaces.kt");
}
@TestMetadata("kt39378.kt")
public void testKt39378() throws Exception {
runTest("js/js.translator/testData/box/jsModule/kt39378.kt");
}
@TestMetadata("topLevelVarargFun.kt")
public void testTopLevelVarargFun() throws Exception {
runTest("js/js.translator/testData/box/jsModule/topLevelVarargFun.kt");
@@ -5252,6 +5252,11 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
runTest("js/js.translator/testData/box/jsModule/interfaces.kt");
}
@TestMetadata("kt39378.kt")
public void testKt39378() throws Exception {
runTest("js/js.translator/testData/box/jsModule/kt39378.kt");
}
@TestMetadata("topLevelVarargFun.kt")
public void testTopLevelVarargFun() throws Exception {
runTest("js/js.translator/testData/box/jsModule/topLevelVarargFun.kt");
+5
View File
@@ -0,0 +1,5 @@
function ee() {
return {
ss: ['O' , 'K']
}
}
+34
View File
@@ -0,0 +1,34 @@
// EXPECTED_REACHABLE_NODES: 1238
// MODULE: lib
// FILE: l.kt
package l
external interface E {
var ss: Array<String> // Effectively external property.
}
external fun ee(): E
fun foo(): String {
val e = ee()
var result = ""
for (s in e.ss) {
result += s
}
return result
}
// MODULE: main(lib)
// FILE: m.kt
import l.*
fun box(): String {
return foo()
}