From 24d7c3761dbae4e1225d7e66cf5c60c9e1170d13 Mon Sep 17 00:00:00 2001 From: Kirill Rakhman Date: Mon, 8 May 2023 11:59:32 +0200 Subject: [PATCH] [FIR, Tests] Don't filter out syntax errors in tests #KT-58469 --- .../testData/resolve/diagnostics/upperBoundViolated.kt | 3 ++- .../tests/qualifiedExpression/nullCalleeExpression.fir.kt | 3 ++- .../tests/qualifiedExpression/nullCalleeExpression.kt | 1 + .../kotlin/test/frontend/fir/handlers/FirDiagnosticsHandler.kt | 2 -- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.kt index d6617284535..1249a552db8 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.kt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.kt @@ -1,3 +1,4 @@ +// COMPARE_WITH_LIGHT_TREE interface A class B where T : A @@ -14,7 +15,7 @@ fun test() { val b1 = B<Int>() val b2 = B() val b3 = B<Any?>() - val b4 = B<UnexistingType>()NL<Int>()NumberPhile + val b4 = B<UnexistingType>()NL<Int>()NumberPhile val b5 = B<B<UnexistingType>>() fest<Boolean>() fest() diff --git a/compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.fir.kt b/compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.fir.kt index 76581cf6570..6be207023bd 100644 --- a/compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.fir.kt +++ b/compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.fir.kt @@ -1,3 +1,4 @@ // NI_EXPECTED_FILE +// COMPARE_WITH_LIGHT_TREE -val unwrapped = some.<cabc$Wrapper<out Any>::unwrap +val unwrapped = some.<cabc$Wrapper<out Any>::unwrap diff --git a/compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.kt b/compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.kt index 3e1d5fce80b..63460a80e07 100644 --- a/compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.kt +++ b/compiler/testData/diagnostics/tests/qualifiedExpression/nullCalleeExpression.kt @@ -1,3 +1,4 @@ // NI_EXPECTED_FILE +// COMPARE_WITH_LIGHT_TREE val unwrapped = some.<cabc$WrapperAny>::unwrap diff --git a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirDiagnosticsHandler.kt b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirDiagnosticsHandler.kt index 2ec0f7c0c82..9c0ca5ed42e 100644 --- a/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirDiagnosticsHandler.kt +++ b/compiler/tests-common-new/tests/org/jetbrains/kotlin/test/frontend/fir/handlers/FirDiagnosticsHandler.kt @@ -341,8 +341,6 @@ fun List.diagnosticCodeMetaInfos( diagnostic.severity ) ) return@flatMap emptyList() - // SYNTAX errors will be reported later - if (diagnostic.factory == FirSyntaxErrors.SYNTAX) return@flatMap emptyList() if (!diagnostic.isValid) return@flatMap emptyList() diagnostic.toMetaInfos( module,