[FIR] KT-57085: Ignore the diagnostic case in @Suppress()
^KT-57085 Fixed
This commit is contained in:
committed by
Space Team
parent
3b97bfb426
commit
07fa86f6bc
+6
@@ -525,6 +525,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt57085.kt")
|
||||
public void testKt57085() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/kt57085.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("LValueAssignment.kt")
|
||||
public void testLValueAssignment() throws Exception {
|
||||
|
||||
+6
@@ -525,6 +525,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt57085.kt")
|
||||
public void testKt57085() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/kt57085.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("LValueAssignment.kt")
|
||||
public void testLValueAssignment() throws Exception {
|
||||
|
||||
+6
-1
@@ -42,6 +42,11 @@ abstract class AbstractDiagnosticCollector(
|
||||
|
||||
private val SUPPRESS_NAMES_NAME = Name.identifier("names")
|
||||
|
||||
private fun correctDiagnosticCase(diagnostic: String): String = when (diagnostic) {
|
||||
SUPPRESS_ALL_INFOS, SUPPRESS_ALL_WARNINGS, SUPPRESS_ALL_ERRORS -> diagnostic
|
||||
else -> diagnostic.uppercase()
|
||||
}
|
||||
|
||||
fun getDiagnosticsSuppressedForContainer(annotationContainer: FirAnnotationContainer): List<String>? {
|
||||
var result: MutableList<String>? = null
|
||||
|
||||
@@ -56,7 +61,7 @@ abstract class AbstractDiagnosticCollector(
|
||||
if (result == null) {
|
||||
result = mutableListOf()
|
||||
}
|
||||
result.add(value)
|
||||
result.add(correctDiagnosticCase(value))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user