K2: remove JAVA_SHADOWED_PROTECTED_FIELD_REFERENCE error
This is a partial revert of949a39b80f. In the end it turned out not necessary to prohibit this case (and perform a breaking change), because JVM backend was fixed to generate it correctly ind73d3c46e2. #KT-55307 Declined #KT-55846 Declined
This commit is contained in:
committed by
Space Team
parent
0ccae0d4c6
commit
9ec78e1aa9
-8
@@ -4875,14 +4875,6 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.JAVA_SHADOWED_PROTECTED_FIELD_REFERENCE) { firDiagnostic ->
|
||||
JavaShadowedProtectedFieldReferenceImpl(
|
||||
firDiagnostic.a,
|
||||
firDiagnostic.b,
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJsErrors.IMPLEMENTING_FUNCTION_INTERFACE) { firDiagnostic ->
|
||||
ImplementingFunctionInterfaceImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
-6
@@ -3395,12 +3395,6 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = JavaSamInterfaceConstructorReference::class
|
||||
}
|
||||
|
||||
abstract class JavaShadowedProtectedFieldReference : KtFirDiagnostic<PsiElement>() {
|
||||
override val diagnosticClass get() = JavaShadowedProtectedFieldReference::class
|
||||
abstract val containerClass: ClassId
|
||||
abstract val shadowingClass: ClassId
|
||||
}
|
||||
|
||||
abstract class ImplementingFunctionInterface : KtFirDiagnostic<KtClassOrObject>() {
|
||||
override val diagnosticClass get() = ImplementingFunctionInterface::class
|
||||
}
|
||||
|
||||
-7
@@ -4104,13 +4104,6 @@ internal class JavaSamInterfaceConstructorReferenceImpl(
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.JavaSamInterfaceConstructorReference(), KtAbstractFirDiagnostic<PsiElement>
|
||||
|
||||
internal class JavaShadowedProtectedFieldReferenceImpl(
|
||||
override val containerClass: ClassId,
|
||||
override val shadowingClass: ClassId,
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: KtLifetimeToken,
|
||||
) : KtFirDiagnostic.JavaShadowedProtectedFieldReference(), KtAbstractFirDiagnostic<PsiElement>
|
||||
|
||||
internal class ImplementingFunctionInterfaceImpl(
|
||||
override val firDiagnostic: KtPsiDiagnostic,
|
||||
override val token: KtLifetimeToken,
|
||||
|
||||
Reference in New Issue
Block a user