K2: add inline JVM target version checker
#KT-60777 Fixed
This commit is contained in:
committed by
Space Team
parent
d475371394
commit
3bb2ea10b6
+8
@@ -4884,6 +4884,14 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.INLINE_FROM_HIGHER_PLATFORM) { firDiagnostic ->
|
||||
InlineFromHigherPlatformImpl(
|
||||
firDiagnostic.a,
|
||||
firDiagnostic.b,
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON) { firDiagnostic ->
|
||||
CannotAllUnderImportFromSingletonImpl(
|
||||
firDiagnostic.a,
|
||||
|
||||
+6
@@ -3401,6 +3401,12 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
val type: KtType
|
||||
}
|
||||
|
||||
interface InlineFromHigherPlatform : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = InlineFromHigherPlatform::class
|
||||
val inlinedBytecodeVersion: String
|
||||
val currentModuleBytecodeVersion: String
|
||||
}
|
||||
|
||||
interface CannotAllUnderImportFromSingleton : KtFirDiagnostic<KtImportDirective> {
|
||||
override val diagnosticClass get() = CannotAllUnderImportFromSingleton::class
|
||||
val objectName: Name
|
||||
|
||||
+7
@@ -4100,6 +4100,13 @@ internal class InefficientEqualsOverridingInValueClassImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<KtNamedFunction>(firDiagnostic, token), KtFirDiagnostic.InefficientEqualsOverridingInValueClass
|
||||
|
||||
internal class InlineFromHigherPlatformImpl(
|
||||
override val inlinedBytecodeVersion: String,
|
||||
override val currentModuleBytecodeVersion: String,
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.InlineFromHigherPlatform
|
||||
|
||||
internal class CannotAllUnderImportFromSingletonImpl(
|
||||
override val objectName: Name,
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
|
||||
Reference in New Issue
Block a user