[FIR] Add TYPE_ARGUMENTS_FOR_OUTER_CLASS_WHEN_NESTED_REFERENCED diagnostics

Report TYPE_ARGUMENTS_FOR_OUTER_CLASS_WHEN_NESTED_REFERENCED instead of
WRONG_NUMBER_OF_TYPE_ARGUMENTS where it's appropriate

^KT-59393 Fixed

Simplify FirTypeResolverImpl
This commit is contained in:
Ivan Kochurkin
2023-09-21 13:13:12 +02:00
committed by Space Team
parent 8d27af5b0d
commit 319fb967ec
18 changed files with 64 additions and 81 deletions
@@ -268,6 +268,10 @@ class ConeTypeArgumentsNotAllowedError(source: KtSourceElement) : ConeDiagnostic
override val reason: String get() = "Type parameters cannot be parameterized with type arguments"
}
class ConeTypeArgumentsForOuterClassWhenNestedReferencedError(source: KtSourceElement) : ConeDiagnosticWithSource(source) {
override val reason: String get() = "Type arguments for outer class are redundant when nested class is referenced"
}
class ConeNoTypeArgumentsOnRhsError(
override val desiredCount: Int,
override val symbol: FirClassLikeSymbol<*>