KT-22274 report warning on labels that can't be referenced
Labels are meaningful only if they can be referenced by 'break', 'continue', or 'return' expressions.
This commit is contained in:
@@ -4140,6 +4140,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/controlStructures/notAFunctionLabel_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("redundantLabel.kt")
|
||||
public void testRedundantLabel() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlStructures/redundantLabel.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialConstructsAndPlatformTypes.kt")
|
||||
public void testSpecialConstructsAndPlatformTypes() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.kt");
|
||||
|
||||
Generated
+5
@@ -4140,6 +4140,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/controlStructures/notAFunctionLabel_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("redundantLabel.kt")
|
||||
public void testRedundantLabel() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlStructures/redundantLabel.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("specialConstructsAndPlatformTypes.kt")
|
||||
public void testSpecialConstructsAndPlatformTypes() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.kt");
|
||||
|
||||
Reference in New Issue
Block a user