JS: add test to prove that KT-19483 is no more reproducible
This commit is contained in:
@@ -3965,6 +3965,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineImportNameClash.kt")
|
||||
public void testInlineImportNameClash() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineImportNameClash.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineInInlineWithLambda.kt")
|
||||
public void testInlineInInlineWithLambda() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inline/inlineInInlineWithLambda.kt");
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1001
|
||||
var l = ""
|
||||
|
||||
fun log(message: String) {
|
||||
l += message + ";"
|
||||
}
|
||||
|
||||
fun baz(x: String){
|
||||
log("baz($x)")
|
||||
}
|
||||
fun baz(x: String, i: Int) {
|
||||
log("baz($x, $i)")
|
||||
}
|
||||
|
||||
inline fun bar() {
|
||||
boo {
|
||||
baz("AAA")
|
||||
foo()
|
||||
}
|
||||
}
|
||||
|
||||
fun boo(x: () -> Unit) = x()
|
||||
|
||||
inline fun foo() {
|
||||
log("foo()")
|
||||
baz("BBB", 333)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
bar()
|
||||
if (l != "baz(AAA);foo();baz(BBB, 333);") return "fail: $l"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user