[NI] Fix exception from IDE completion
Fake arguments that are created for completion might have missing PSI parts (see `DummyArgument`)
This commit is contained in:
+1
-2
@@ -124,8 +124,7 @@ class DiagnosticReporterByTrackingStrategy(
|
||||
}
|
||||
|
||||
override fun onCallArgumentName(callArgument: KotlinCallArgument, diagnostic: KotlinCallDiagnostic) {
|
||||
val nameReference = callArgument.psiCallArgument.valueArgument.getArgumentName()?.referenceExpression
|
||||
?: error("Argument name should be not null for argument: $callArgument")
|
||||
val nameReference = callArgument.psiCallArgument.valueArgument.getArgumentName()?.referenceExpression ?: return
|
||||
when (diagnostic.javaClass) {
|
||||
NamedArgumentReference::class.java -> {
|
||||
trace.record(BindingContext.REFERENCE_TARGET, nameReference, (diagnostic as NamedArgumentReference).parameterDescriptor)
|
||||
|
||||
Reference in New Issue
Block a user