[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 DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
|||||||
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt57085.kt")
|
||||||
|
public void testKt57085() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/kt57085.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("LValueAssignment.kt")
|
@TestMetadata("LValueAssignment.kt")
|
||||||
public void testLValueAssignment() throws Exception {
|
public void testLValueAssignment() throws Exception {
|
||||||
|
|||||||
+6
@@ -525,6 +525,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt57085.kt")
|
||||||
|
public void testKt57085() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/kt57085.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("LValueAssignment.kt")
|
@TestMetadata("LValueAssignment.kt")
|
||||||
public void testLValueAssignment() throws Exception {
|
public void testLValueAssignment() throws Exception {
|
||||||
|
|||||||
+6
@@ -525,6 +525,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt57085.kt")
|
||||||
|
public void testKt57085() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/kt57085.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("LValueAssignment.kt")
|
@TestMetadata("LValueAssignment.kt")
|
||||||
public void testLValueAssignment() throws Exception {
|
public void testLValueAssignment() throws Exception {
|
||||||
|
|||||||
+6
-1
@@ -42,6 +42,11 @@ abstract class AbstractDiagnosticCollector(
|
|||||||
|
|
||||||
private val SUPPRESS_NAMES_NAME = Name.identifier("names")
|
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>? {
|
fun getDiagnosticsSuppressedForContainer(annotationContainer: FirAnnotationContainer): List<String>? {
|
||||||
var result: MutableList<String>? = null
|
var result: MutableList<String>? = null
|
||||||
|
|
||||||
@@ -56,7 +61,7 @@ abstract class AbstractDiagnosticCollector(
|
|||||||
if (result == null) {
|
if (result == null) {
|
||||||
result = mutableListOf()
|
result = mutableListOf()
|
||||||
}
|
}
|
||||||
result.add(value)
|
result.add(correctDiagnosticCase(value))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// WITH_STDLIB
|
||||||
|
|
||||||
|
@Suppress("inapplicable_jvm_name")
|
||||||
|
interface Factory {
|
||||||
|
@get:JvmName("supportsMultilevelIntrospection") // K1: ok, K2: INAPPLICABLE_JVM_NAME
|
||||||
|
val supportsMultilevelIntrospection: Boolean
|
||||||
|
get() = false
|
||||||
|
}
|
||||||
Generated
+6
@@ -525,6 +525,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt57085.kt")
|
||||||
|
public void testKt57085() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/kt57085.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("LValueAssignment.kt")
|
@TestMetadata("LValueAssignment.kt")
|
||||||
public void testLValueAssignment() throws Exception {
|
public void testLValueAssignment() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user