From cd68cefba1ec874df9ef0abda322498f6c484925 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Mon, 1 Jun 2015 18:36:19 +0300 Subject: [PATCH] Added diagnostic for EA-68663 --- .../src/org/jetbrains/kotlin/idea/completion/ExpectedInfos.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/ExpectedInfos.kt b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/ExpectedInfos.kt index f49e1cb65de..f2b6c9329ee 100644 --- a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/ExpectedInfos.kt +++ b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/ExpectedInfos.kt @@ -130,7 +130,9 @@ class ExpectedInfos( public fun calculateForArgument(call: Call, argument: ValueArgument): Collection? { val argumentIndex = call.getValueArguments().indexOf(argument) - assert(argumentIndex >= 0) + assert(argumentIndex >= 0) { + "Could not find argument '$argument' among arguments of call: $call" + } val argumentName = argument.getArgumentName()?.getReferenceExpression()?.getReferencedName() val isFunctionLiteralArgument = argument is FunctionLiteralArgument val argumentPosition = ArgumentPosition(argumentIndex, argumentName, isFunctionLiteralArgument)