K2: report IR_WITH_UNSTABLE_ABI_COMPILED_CLASS
Also, remove setting the value of allowUnstableDependencies to true if K2 is used because we want K2 to report errors (as K1 does) on unstable-ABI dependencies. #KT-61598 Fixed
This commit is contained in:
committed by
Space Team
parent
6a1c210cd1
commit
4f96171716
+7
@@ -4938,6 +4938,13 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.IR_WITH_UNSTABLE_ABI_COMPILED_CLASS) { firDiagnostic ->
|
||||
IrWithUnstableAbiCompiledClassImpl(
|
||||
firDiagnostic.a,
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.OVERRIDE_CANNOT_BE_STATIC) { firDiagnostic ->
|
||||
OverrideCannotBeStaticImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
+5
@@ -3438,6 +3438,11 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
val presentableString: String
|
||||
}
|
||||
|
||||
interface IrWithUnstableAbiCompiledClass : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = IrWithUnstableAbiCompiledClass::class
|
||||
val presentableString: String
|
||||
}
|
||||
|
||||
interface OverrideCannotBeStatic : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = OverrideCannotBeStatic::class
|
||||
}
|
||||
|
||||
+6
@@ -4146,6 +4146,12 @@ internal class PreReleaseClassImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.PreReleaseClass
|
||||
|
||||
internal class IrWithUnstableAbiCompiledClassImpl(
|
||||
override val presentableString: String,
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.IrWithUnstableAbiCompiledClass
|
||||
|
||||
internal class OverrideCannotBeStaticImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
|
||||
Reference in New Issue
Block a user