[FIR JS] Support DYNAMIC_RECEIVER_NOT_ALLOWED
This commit is contained in:
committed by
Space Team
parent
0f876f665a
commit
227969d787
+6
@@ -2022,6 +2022,12 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.DYNAMIC_RECEIVER_NOT_ALLOWED) { firDiagnostic ->
|
||||
DynamicReceiverNotAllowedImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.INCOMPATIBLE_TYPES) { firDiagnostic ->
|
||||
IncompatibleTypesImpl(
|
||||
firSymbolBuilder.typeBuilder.buildKtType(firDiagnostic.a),
|
||||
|
||||
+4
@@ -1435,6 +1435,10 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = DynamicUpperBound::class
|
||||
}
|
||||
|
||||
abstract class DynamicReceiverNotAllowed : KtFirDiagnostic<KtElement>() {
|
||||
override val diagnosticClass get() = DynamicReceiverNotAllowed::class
|
||||
}
|
||||
|
||||
abstract class IncompatibleTypes : KtFirDiagnostic<KtElement>() {
|
||||
override val diagnosticClass get() = IncompatibleTypes::class
|
||||
abstract val typeA: KtType
|
||||
|
||||
+5
@@ -1727,6 +1727,11 @@ internal class DynamicUpperBoundImpl(
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.DynamicUpperBound(), KtAbstractFirDiagnostic<KtTypeReference>
|
||||
|
||||
internal class DynamicReceiverNotAllowedImpl(
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.DynamicReceiverNotAllowed(), KtAbstractFirDiagnostic<KtElement>
|
||||
|
||||
internal class IncompatibleTypesImpl(
|
||||
override val typeA: KtType,
|
||||
override val typeB: KtType,
|
||||
|
||||
Reference in New Issue
Block a user