JS: when recursive local function does not capture variables, give it name from top-level scope. See KT-15770

This commit is contained in:
Alexey Andreev
2017-01-18 12:43:28 +03:00
committed by Alexey Andreev
parent 70d2296e61
commit ac0df8eef9
3 changed files with 60 additions and 13 deletions
@@ -5678,6 +5678,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
doTest(fileName);
}
@TestMetadata("localFunctions.kt")
public void testLocalFunctions() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/localFunctions.kt");
doTest(fileName);
}
@TestMetadata("methodAndPrivateProperty.kt")
public void testMethodAndPrivateProperty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/nameClashes/methodAndPrivateProperty.kt");