[NI] Fix diagnostic reporting for missing type parameter info
#KT-31975 fixed
This commit is contained in:
+6
-3
@@ -357,10 +357,13 @@ class DiagnosticReporterByTrackingStrategy(
|
||||
}
|
||||
|
||||
NotEnoughInformationForTypeParameter::class.java -> {
|
||||
if (allDiagnostics.any {it is ConstrainingTypeIsError || it is NewConstraintError || it is WrongCountOfTypeArguments})
|
||||
return
|
||||
|
||||
val error = diagnostic as NotEnoughInformationForTypeParameter
|
||||
if (allDiagnostics.any {
|
||||
(it is ConstrainingTypeIsError && it.typeVariable == error.typeVariable)
|
||||
|| it is NewConstraintError || it is WrongCountOfTypeArguments
|
||||
}
|
||||
) return
|
||||
|
||||
val call = error.resolvedAtom.atom?.safeAs<PSIKotlinCall>()?.psiCall ?: call
|
||||
val expression = call.calleeExpression ?: return
|
||||
val typeVariableName = when (val typeVariable = error.typeVariable) {
|
||||
|
||||
Reference in New Issue
Block a user