Report error about uninferred type parameter for all CallForImplicitInvoke psi calls

^KT-44368 Fixed
This commit is contained in:
Victor Petukhov
2021-02-04 15:31:10 +03:00
parent c75d2c05f0
commit f9e5584a3e
6 changed files with 33 additions and 2 deletions
@@ -446,8 +446,14 @@ class DiagnosticReporterByTrackingStrategy(
if (isDiagnosticRedundant) return
val expression = when (val atom = error.resolvedAtom.atom) {
is PSIKotlinCallForInvoke -> (atom.psiCall as? CallTransformer.CallForImplicitInvoke)?.outerCall?.calleeExpression
is PSIKotlinCall -> atom.psiCall.calleeExpression
is PSIKotlinCall -> {
val psiCall = atom.psiCall
if (psiCall is CallTransformer.CallForImplicitInvoke) {
psiCall.outerCall.calleeExpression
} else {
psiCall.calleeExpression
}
}
is PSIKotlinCallArgument -> atom.valueArgument.getArgumentExpression()
else -> call.calleeExpression
} ?: return