[FIR] Fix reporting of TYPE_ARGUMENTS_NOT_ALLOWED instead of WRONG_NUMBER_OF_TYPE_ARGUMENTS

This commit is contained in:
Ivan Kochurkin
2023-09-21 12:07:29 +02:00
committed by Space Team
parent 42e5e43302
commit 8d27af5b0d
4 changed files with 8 additions and 3 deletions
@@ -286,9 +286,8 @@ class FirTypeResolverImpl(private val session: FirSession) : FirTypeResolver() {
if (currentDeclaration == null) {
// It's a package name
// TODO: report TYPE_ARGUMENTS_NOT_ALLOWED instead of WRONG_NUMBER_OF_TYPE_ARGUMENTS
if (qualifierPartArgsCount > 0) {
return createWrongNumberOfTypeArgumentsError(0, qualifierPartIndex, symbol, typeRef)
return ConeErrorType(ConeTypeArgumentsNotAllowedError(qualifierPart.typeArgumentList.source!!))
}
break
}