[FIR] Report type-aliased 'Nothing' as return type
This warning was issued in K1, but lost in K2 ^KT-59420 Fixed ^KT-59429 Fixed
This commit is contained in:
committed by
Space Team
parent
f6b2c642c2
commit
310e89f100
+12
@@ -2360,6 +2360,18 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.ABBREVIATED_NOTHING_RETURN_TYPE) { firDiagnostic ->
|
||||
AbbreviatedNothingReturnTypeImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.ABBREVIATED_NOTHING_PROPERTY_TYPE) { firDiagnostic ->
|
||||
AbbreviatedNothingPropertyTypeImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
token,
|
||||
)
|
||||
}
|
||||
add(FirErrors.CYCLIC_GENERIC_UPPER_BOUND) { firDiagnostic ->
|
||||
CyclicGenericUpperBoundImpl(
|
||||
firDiagnostic as KtPsiDiagnostic,
|
||||
|
||||
+8
@@ -1678,6 +1678,14 @@ sealed interface KtFirDiagnostic<PSI : PsiElement> : KtDiagnosticWithPsi<PSI> {
|
||||
override val diagnosticClass get() = ImplicitNothingPropertyType::class
|
||||
}
|
||||
|
||||
interface AbbreviatedNothingReturnType : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = AbbreviatedNothingReturnType::class
|
||||
}
|
||||
|
||||
interface AbbreviatedNothingPropertyType : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = AbbreviatedNothingPropertyType::class
|
||||
}
|
||||
|
||||
interface CyclicGenericUpperBound : KtFirDiagnostic<PsiElement> {
|
||||
override val diagnosticClass get() = CyclicGenericUpperBound::class
|
||||
}
|
||||
|
||||
+10
@@ -2017,6 +2017,16 @@ internal class ImplicitNothingPropertyTypeImpl(
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.ImplicitNothingPropertyType
|
||||
|
||||
internal class AbbreviatedNothingReturnTypeImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.AbbreviatedNothingReturnType
|
||||
|
||||
internal class AbbreviatedNothingPropertyTypeImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
) : KtAbstractFirDiagnostic<PsiElement>(firDiagnostic, token), KtFirDiagnostic.AbbreviatedNothingPropertyType
|
||||
|
||||
internal class CyclicGenericUpperBoundImpl(
|
||||
firDiagnostic: KtPsiDiagnostic,
|
||||
token: KtLifetimeToken,
|
||||
|
||||
Reference in New Issue
Block a user