[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
This commit is contained in:
committed by
Space Team
parent
9189154cae
commit
371b1eb3d5
+2
@@ -5091,6 +5091,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,
|
||||
)
|
||||
@@ -5099,6 +5100,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
@@ -3544,12 +3544,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
@@ -4274,6 +4274,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
|
||||
@@ -4281,6 +4282,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