K2 Scripting: deprecate top level script inner classes
no LT support yet
This commit is contained in:
committed by
Space Team
parent
7484ccb9ee
commit
70d2fcd9c4
+12
@@ -253,6 +253,18 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.INNER_ON_TOP_LEVEL_SCRIPT_CLASS.errorFactory) { firDiagnostic ->
|
||||
InnerOnTopLevelScriptClassErrorImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.INNER_ON_TOP_LEVEL_SCRIPT_CLASS.warningFactory) { firDiagnostic ->
|
||||
InnerOnTopLevelScriptClassWarningImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.INVISIBLE_REFERENCE) { firDiagnostic ->
|
||||
InvisibleReferenceImpl(
|
||||
firSymbolBuilder.buildSymbol(firDiagnostic.a),
|
||||
|
||||
+8
@@ -217,6 +217,14 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
val callableId: CallableId
|
||||
}
|
||||
|
||||
interface InnerOnTopLevelScriptClassError : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = InnerOnTopLevelScriptClassError::class
|
||||
}
|
||||
|
||||
interface InnerOnTopLevelScriptClassWarning : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = InnerOnTopLevelScriptClassWarning::class
|
||||
}
|
||||
|
||||
interface InvisibleReference : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = InvisibleReference::class
|
||||
val reference: KtSymbol
|
||||
|
||||
+10
@@ -246,6 +246,16 @@ internal class InvisibleSetterImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.InvisibleSetter
|
||||
|
||||
internal class InnerOnTopLevelScriptClassErrorImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.InnerOnTopLevelScriptClassError
|
||||
|
||||
internal class InnerOnTopLevelScriptClassWarningImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.InnerOnTopLevelScriptClassWarning
|
||||
|
||||
internal class InvisibleReferenceImpl(
|
||||
override val reference: KtSymbol,
|
||||
override val visible: Visibility,
|
||||
|
||||
Reference in New Issue
Block a user