Added diagnostic for EA-68663

This commit is contained in:
Valentin Kipyatkov
2015-06-01 18:36:19 +03:00
parent 7be59f969c
commit cd68cefba1
@@ -130,7 +130,9 @@ class ExpectedInfos(
public fun calculateForArgument(call: Call, argument: ValueArgument): Collection<ExpectedInfo>? {
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)