[JS] Add test for KT-39378
This commit is contained in:
+5
@@ -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");
|
||||
|
||||
+5
@@ -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");
|
||||
|
||||
+5
@@ -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");
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
function ee() {
|
||||
return {
|
||||
ss: ['O' , 'K']
|
||||
}
|
||||
}
|
||||
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user