[NI] Report "not enough information" on callable references in lambdas
^KT-34314 Fixed
This commit is contained in:
+6
-2
@@ -373,8 +373,12 @@ class DiagnosticReporterByTrackingStrategy(
|
||||
}
|
||||
) return
|
||||
|
||||
val call = error.resolvedAtom.atom?.safeAs<PSIKotlinCall>()?.psiCall ?: call
|
||||
val expression = call.calleeExpression ?: return
|
||||
val expression = when (val atom = error.resolvedAtom.atom) {
|
||||
is PSIKotlinCall -> atom.psiCall.calleeExpression
|
||||
is PSIKotlinCallArgument -> atom.valueArgument.getArgumentExpression()
|
||||
else -> call.calleeExpression
|
||||
} ?: return
|
||||
|
||||
val typeVariableName = when (val typeVariable = error.typeVariable) {
|
||||
is TypeVariableFromCallableDescriptor -> typeVariable.originalTypeParameter.name.asString()
|
||||
is TypeVariableForLambdaReturnType -> "return type of lambda"
|
||||
|
||||
Reference in New Issue
Block a user