[FIR] Don't lose error level enhancements in warning-level-enhanced arguments
The error-level enhancement is kept as warning-level and a new
LanguageFeature is introduced to turn the warning into an error.
#KT-63208 Fixed
#KT-63209
(cherry picked from commit 371b1eb3d5)
This commit is contained in:
committed by
Space Team
parent
c39262195d
commit
e91e9d8ca8
+2
@@ -5092,6 +5092,7 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
ReceiverNullabilityMismatchBasedOnJavaAnnotationsImpl(
|
||||
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.a),
|
||||
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.b),
|
||||
firDiagnostic.c,
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
@@ -5100,6 +5101,7 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
NullabilityMismatchBasedOnJavaAnnotationsImpl(
|
||||
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.a),
|
||||
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.b),
|
||||
firDiagnostic.c,
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
|
||||
+2
@@ -3545,12 +3545,14 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = ReceiverNullabilityMismatchBasedOnJavaAnnotations::class
|
||||
val actualType: KtType
|
||||
val expectedType: KtType
|
||||
val messageSuffix: String
|
||||
}
|
||||
|
||||
interface NullabilityMismatchBasedOnJavaAnnotations : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = NullabilityMismatchBasedOnJavaAnnotations::class
|
||||
val actualType: KtType
|
||||
val expectedType: KtType
|
||||
val messageSuffix: String
|
||||
}
|
||||
|
||||
interface UpperBoundCannotBeArray : KtFirDiagnostic<PsiElement> {
|
||||
|
||||
+2
@@ -4275,6 +4275,7 @@ internal class JavaTypeMismatchImpl(
|
||||
internal class ReceiverNullabilityMismatchBasedOnJavaAnnotationsImpl(
|
||||
override val actualType: KtType,
|
||||
override val expectedType: KtType,
|
||||
override val messageSuffix: String,
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.ReceiverNullabilityMismatchBasedOnJavaAnnotations
|
||||
@@ -4282,6 +4283,7 @@ internal class ReceiverNullabilityMismatchBasedOnJavaAnnotationsImpl(
|
||||
internal class NullabilityMismatchBasedOnJavaAnnotationsImpl(
|
||||
override val actualType: KtType,
|
||||
override val expectedType: KtType,
|
||||
override val messageSuffix: String,
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.NullabilityMismatchBasedOnJavaAnnotations
|
||||
|
||||
Reference in New Issue
Block a user