[FIR] Add REPEATED_ANNOTATION_WITH_CONTAINER, NON_SOURCE_REPEATED_ANNOTATION
REPEATED_ANNOTATION_TARGET6
This commit is contained in:
committed by
TeamCityServer
parent
2baed77598
commit
97bc079634
+23
-3
@@ -2520,7 +2520,7 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
firDiagnostic.b,
|
||||
firDiagnostic.c.mapKeys { (incompatible, _) ->
|
||||
incompatible
|
||||
}.mapValues { (_, collection) ->
|
||||
}.mapValues { (_, collection) ->
|
||||
collection.map { firBasedSymbol ->
|
||||
firSymbolBuilder.buildSymbol(firBasedSymbol.fir)
|
||||
}
|
||||
@@ -2534,7 +2534,7 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
firSymbolBuilder.buildSymbol(firDiagnostic.a.fir),
|
||||
firDiagnostic.b.mapKeys { (incompatible, _) ->
|
||||
incompatible
|
||||
}.mapValues { (_, collection) ->
|
||||
}.mapValues { (_, collection) ->
|
||||
collection.map { firBasedSymbol ->
|
||||
firSymbolBuilder.buildSymbol(firBasedSymbol.fir)
|
||||
}
|
||||
@@ -2569,7 +2569,7 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
firDiagnostic.b.map { pair ->
|
||||
firSymbolBuilder.buildSymbol(pair.first.fir) to pair.second.mapKeys { (incompatible, _) ->
|
||||
incompatible
|
||||
}.mapValues { (_, collection) ->
|
||||
}.mapValues { (_, collection) ->
|
||||
collection.map { firBasedSymbol ->
|
||||
firSymbolBuilder.buildSymbol(firBasedSymbol.fir)
|
||||
}
|
||||
@@ -3780,6 +3780,26 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.NON_SOURCE_REPEATED_ANNOTATION) { firDiagnostic ->
|
||||
NonSourceRepeatedAnnotationImpl(
|
||||
firDiagnostic as FirPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.REPEATED_ANNOTATION_TARGET6) { firDiagnostic ->
|
||||
RepeatedAnnotationTarget6Impl(
|
||||
firDiagnostic as FirPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.REPEATED_ANNOTATION_WITH_CONTAINER) { firDiagnostic ->
|
||||
RepeatedAnnotationWithContainerImpl(
|
||||
firDiagnostic.a,
|
||||
firDiagnostic.b,
|
||||
firDiagnostic as FirPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.INAPPLICABLE_JVM_FIELD) { firDiagnostic ->
|
||||
InapplicableJvmFieldImpl(
|
||||
firDiagnostic.a,
|
||||
|
||||
+14
@@ -2628,6 +2628,20 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = ExternalDeclarationCannotBeInlined::class
|
||||
}
|
||||
|
||||
abstract class NonSourceRepeatedAnnotation : KtFirDiagnostic<KtAnnotationEntry>() {
|
||||
override val diagnosticClass get() = NonSourceRepeatedAnnotation::class
|
||||
}
|
||||
|
||||
abstract class RepeatedAnnotationTarget6 : KtFirDiagnostic<KtAnnotationEntry>() {
|
||||
override val diagnosticClass get() = RepeatedAnnotationTarget6::class
|
||||
}
|
||||
|
||||
abstract class RepeatedAnnotationWithContainer : KtFirDiagnostic<KtAnnotationEntry>() {
|
||||
override val diagnosticClass get() = RepeatedAnnotationWithContainer::class
|
||||
abstract val name: FqName
|
||||
abstract val explicitContainerName: FqName
|
||||
}
|
||||
|
||||
abstract class InapplicableJvmField : KtFirDiagnostic<KtAnnotationEntry>() {
|
||||
override val diagnosticClass get() = InapplicableJvmField::class
|
||||
abstract val message: String
|
||||
|
||||
+23
@@ -4273,6 +4273,29 @@ internal class ExternalDeclarationCannotBeInlinedImpl(
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
internal class NonSourceRepeatedAnnotationImpl(
|
||||
firDiagnostic: FirPsiDiagnostic,
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.NonSourceRepeatedAnnotation(), KtAbstractFirDiagnostic<KtAnnotationEntry> {
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
internal class RepeatedAnnotationTarget6Impl(
|
||||
firDiagnostic: FirPsiDiagnostic,
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.RepeatedAnnotationTarget6(), KtAbstractFirDiagnostic<KtAnnotationEntry> {
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
internal class RepeatedAnnotationWithContainerImpl(
|
||||
override val name: FqName,
|
||||
override val explicitContainerName: FqName,
|
||||
firDiagnostic: FirPsiDiagnostic,
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.RepeatedAnnotationWithContainer(), KtAbstractFirDiagnostic<KtAnnotationEntry> {
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
internal class InapplicableJvmFieldImpl(
|
||||
override val message: String,
|
||||
firDiagnostic: FirPsiDiagnostic,
|
||||
|
||||
Reference in New Issue
Block a user