[FIR] Add support for ILLEGAL_JVM_NAME diagnostic
This commit is contained in:
+6
@@ -3664,4 +3664,10 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirJvmErrors.ILLEGAL_JVM_NAME) { firDiagnostic ->
|
||||
IllegalJvmNameImpl(
|
||||
firDiagnostic as FirPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -2550,4 +2550,8 @@ sealed class KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = IllegalJavaLangRecordSupertype::class
|
||||
}
|
||||
|
||||
abstract class IllegalJvmName : KtFirDiagnostic<PsiElement>() {
|
||||
override val diagnosticClass get() = IllegalJvmName::class
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -4138,3 +4138,10 @@ internal class IllegalJavaLangRecordSupertypeImpl(
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
internal class IllegalJvmNameImpl(
|
||||
firDiagnostic: FirPsiDiagnostic,
|
||||
override val token: ValidityToken,
|
||||
) : KtFirDiagnostic.IllegalJvmName(), KtAbstractFirDiagnostic<PsiElement> {
|
||||
override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user