JS: prove that KT-8282 is no more reproducible
This commit is contained in:
@@ -5149,6 +5149,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/valDeclaration.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/valDeclaration.kt");
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("varargTemporaryVar.kt")
|
||||||
|
public void testVarargTemporaryVar() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inlineSizeReduction/varargTemporaryVar.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("js/js.translator/testData/box/inlineStdlib")
|
@TestMetadata("js/js.translator/testData/box/inlineStdlib")
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// EXPECTED_REACHABLE_NODES: 1026
|
||||||
|
// CHECK_VARS_COUNT: function=test1 count=0
|
||||||
|
// CHECK_VARS_COUNT: function=test2 count=0
|
||||||
|
// CHECK_VARS_COUNT: function=test3 count=1
|
||||||
|
|
||||||
|
inline fun foo(vararg x: String) = x.size
|
||||||
|
|
||||||
|
inline fun bar(vararg x: String) = x.size + x.size
|
||||||
|
|
||||||
|
fun test1() = foo("Q", "W", "E")
|
||||||
|
|
||||||
|
fun test2() = foo("*", "@")
|
||||||
|
|
||||||
|
fun test3() = bar("*", "@")
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
if (test1() != 3) return "fail1: ${test1()}"
|
||||||
|
if (test2() != 2) return "fail1: ${test2()}"
|
||||||
|
if (test3() != 4) return "fail1: ${test3()}"
|
||||||
|
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user