[LL FIR] Replace IGNORE_DIAGNOSTIC_API with IGNORE_NON_REVERSED_RESOLVE
This commit is contained in:
committed by
Space Team
parent
28c80a1581
commit
9ea9950d28
+2
-27
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.analysis.low.level.api.fir.diagnostic.compiler.based
|
package org.jetbrains.kotlin.analysis.low.level.api.fir.diagnostic.compiler.based
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.analysis.low.level.api.fir.LLFirOnlyNonReversedTestSuppressor
|
||||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.compiler.based.AbstractCompilerBasedTestForFir
|
import org.jetbrains.kotlin.analysis.low.level.api.fir.compiler.based.AbstractCompilerBasedTestForFir
|
||||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.diagnostic.compiler.based.facades.LLFirAnalyzerFacadeFactoryWithoutPreresolve
|
import org.jetbrains.kotlin.analysis.low.level.api.fir.diagnostic.compiler.based.facades.LLFirAnalyzerFacadeFactoryWithoutPreresolve
|
||||||
import org.jetbrains.kotlin.fir.symbols.FirLazyResolveContractViolationException
|
import org.jetbrains.kotlin.fir.symbols.FirLazyResolveContractViolationException
|
||||||
@@ -25,7 +26,7 @@ abstract class AbstractDiagnosticCompilerTestDataTest : AbstractCompilerBasedTes
|
|||||||
testDataConsistencyHandler = ::ReversedFirIdenticalChecker,
|
testDataConsistencyHandler = ::ReversedFirIdenticalChecker,
|
||||||
)
|
)
|
||||||
useAfterAnalysisCheckers(::ContractViolationSuppressor)
|
useAfterAnalysisCheckers(::ContractViolationSuppressor)
|
||||||
useAfterAnalysisCheckers(::DiagnosticSuppressor)
|
useAfterAnalysisCheckers(::LLFirOnlyNonReversedTestSuppressor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,29 +56,3 @@ private class ContractViolationSuppressor(testServices: TestServices) : AfterAna
|
|||||||
val IGNORE_CONTRACT_VIOLATIONS by directive("Temporary disables test with contract violation until the issue is fixed")
|
val IGNORE_CONTRACT_VIOLATIONS by directive("Temporary disables test with contract violation until the issue is fixed")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class DiagnosticSuppressor(testServices: TestServices) : AfterAnalysisChecker(testServices) {
|
|
||||||
override val directiveContainers: List<DirectivesContainer> get() = listOf(Companion)
|
|
||||||
|
|
||||||
override fun suppressIfNeeded(failedAssertions: List<WrappedException>): List<WrappedException> {
|
|
||||||
if (!isDisabled()) {
|
|
||||||
return failedAssertions
|
|
||||||
}
|
|
||||||
|
|
||||||
return if (failedAssertions.isEmpty()) {
|
|
||||||
listOf(
|
|
||||||
AssertionError(
|
|
||||||
"Test contains $IGNORE_DIAGNOSTIC_API directive but no errors was reported. Please remove directive",
|
|
||||||
).wrap()
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
emptyList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun isDisabled(): Boolean = IGNORE_DIAGNOSTIC_API in testServices.moduleStructure.allDirectives
|
|
||||||
|
|
||||||
companion object : SimpleDirectivesContainer() {
|
|
||||||
val IGNORE_DIAGNOSTIC_API by directive("Temporary disables diagnostic api test until the issue is fixed")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// WITH_STDLIB
|
// WITH_STDLIB
|
||||||
// SCOPE_DUMP: A:removeAt
|
// SCOPE_DUMP: A:removeAt
|
||||||
// ISSUE: KT-65410
|
// ISSUE: KT-65410
|
||||||
// IGNORE_DIAGNOSTIC_API
|
// IGNORE_NON_REVERSED_RESOLVE
|
||||||
// IGNORE_REVERSED_RESOLVE
|
// IGNORE_REVERSED_RESOLVE
|
||||||
// Reason: SCOPE_DUMP uses different parameter names in AA modes
|
// Reason: SCOPE_DUMP uses different parameter names in AA modes
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// LANGUAGE: +MultiPlatformProjects
|
// LANGUAGE: +MultiPlatformProjects
|
||||||
// IGNORE_DIAGNOSTIC_API
|
// IGNORE_NON_REVERSED_RESOLVE
|
||||||
// IGNORE_REVERSED_RESOLVE
|
// IGNORE_REVERSED_RESOLVE
|
||||||
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// LANGUAGE: +MultiPlatformProjects
|
// LANGUAGE: +MultiPlatformProjects
|
||||||
// IGNORE_DIAGNOSTIC_API
|
// IGNORE_NON_REVERSED_RESOLVE
|
||||||
// IGNORE_REVERSED_RESOLVE
|
// IGNORE_REVERSED_RESOLVE
|
||||||
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// !LANGUAGE: +MultiPlatformProjects
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
// IGNORE_DIAGNOSTIC_API
|
// IGNORE_NON_REVERSED_RESOLVE
|
||||||
// IGNORE_REVERSED_RESOLVE
|
// IGNORE_REVERSED_RESOLVE
|
||||||
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// !LANGUAGE: +MultiPlatformProjects
|
// !LANGUAGE: +MultiPlatformProjects
|
||||||
// IGNORE_DIAGNOSTIC_API
|
// IGNORE_NON_REVERSED_RESOLVE
|
||||||
// IGNORE_REVERSED_RESOLVE
|
// IGNORE_REVERSED_RESOLVE
|
||||||
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
// LANGUAGE: +MultiPlatformProjects
|
// LANGUAGE: +MultiPlatformProjects
|
||||||
// IGNORE_DIAGNOSTIC_API
|
// IGNORE_NON_REVERSED_RESOLVE
|
||||||
// IGNORE_REVERSED_RESOLVE
|
// IGNORE_REVERSED_RESOLVE
|
||||||
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
// LANGUAGE: +MultiPlatformProjects
|
// LANGUAGE: +MultiPlatformProjects
|
||||||
// IGNORE_DIAGNOSTIC_API
|
// IGNORE_NON_REVERSED_RESOLVE
|
||||||
// IGNORE_REVERSED_RESOLVE
|
// IGNORE_REVERSED_RESOLVE
|
||||||
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
// LANGUAGE: +MultiPlatformProjects
|
// LANGUAGE: +MultiPlatformProjects
|
||||||
// ISSUE: KT-58845
|
// ISSUE: KT-58845
|
||||||
// IGNORE_DIAGNOSTIC_API
|
// IGNORE_NON_REVERSED_RESOLVE
|
||||||
// IGNORE_REVERSED_RESOLVE
|
// IGNORE_REVERSED_RESOLVE
|
||||||
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
// LANGUAGE: +MultiPlatformProjects
|
// LANGUAGE: +MultiPlatformProjects
|
||||||
// ISSUE: KT-58845
|
// ISSUE: KT-58845
|
||||||
// IGNORE_DIAGNOSTIC_API
|
// IGNORE_NON_REVERSED_RESOLVE
|
||||||
// IGNORE_REVERSED_RESOLVE
|
// IGNORE_REVERSED_RESOLVE
|
||||||
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
// Reason: MPP diagnostics are reported differentely in the compiler and AA
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
// !WITH_NEW_INFERENCE
|
// !WITH_NEW_INFERENCE
|
||||||
// IGNORE_REVERSED_RESOLVE
|
// IGNORE_REVERSED_RESOLVE
|
||||||
// IGNORE_DIAGNOSTIC_API
|
// IGNORE_NON_REVERSED_RESOLVE
|
||||||
// DUMP_CFG: LEVELS
|
// DUMP_CFG: LEVELS
|
||||||
// KT-62840
|
// KT-62840
|
||||||
val (a1, a2) = A()
|
val (a1, a2) = A()
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
// !WITH_NEW_INFERENCE
|
// !WITH_NEW_INFERENCE
|
||||||
// IGNORE_REVERSED_RESOLVE
|
// IGNORE_REVERSED_RESOLVE
|
||||||
// IGNORE_DIAGNOSTIC_API
|
// IGNORE_NON_REVERSED_RESOLVE
|
||||||
// DUMP_CFG: LEVELS
|
// DUMP_CFG: LEVELS
|
||||||
// KT-62840
|
// KT-62840
|
||||||
val (a1, a2) = A()
|
val (a1, a2) = A()
|
||||||
|
|||||||
Reference in New Issue
Block a user