Resolve control label locally when label name clashes with fun name

#KT-5354 Fixed
 #KT-15085 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-04-17 16:17:10 +03:00
parent 1c3f546319
commit 6a352bccb6
9 changed files with 162 additions and 22 deletions
@@ -4402,6 +4402,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("continueAndBreakLabelWithSameFunctionName.kt")
public void testContinueAndBreakLabelWithSameFunctionName() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/continueAndBreakLabelWithSameFunctionName.kt");
doTest(fileName);
}
@TestMetadata("emptyIf.kt")
public void testEmptyIf() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/emptyIf.kt");
@@ -10064,6 +10064,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/labels"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("controlLabelClashesWithFuncitonName.kt")
public void testControlLabelClashesWithFuncitonName() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/controlLabelClashesWithFuncitonName.kt");
doTest(fileName);
}
@TestMetadata("labeledDeclarations.kt")
public void testLabeledDeclarations() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/labeledDeclarations.kt");
@@ -10064,6 +10064,12 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/labels"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true);
}
@TestMetadata("controlLabelClashesWithFuncitonName.kt")
public void testControlLabelClashesWithFuncitonName() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/controlLabelClashesWithFuncitonName.kt");
doTest(fileName);
}
@TestMetadata("labeledDeclarations.kt")
public void testLabeledDeclarations() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/labels/labeledDeclarations.kt");