diff --git a/idea/src/org/jetbrains/kotlin/idea/parameterInfo/KotlinFunctionParameterInfoHandler.kt b/idea/src/org/jetbrains/kotlin/idea/parameterInfo/KotlinFunctionParameterInfoHandler.kt index 4d3bc2d7bb1..074054d95ed 100644 --- a/idea/src/org/jetbrains/kotlin/idea/parameterInfo/KotlinFunctionParameterInfoHandler.kt +++ b/idea/src/org/jetbrains/kotlin/idea/parameterInfo/KotlinFunctionParameterInfoHandler.kt @@ -62,6 +62,7 @@ import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.isError import org.jetbrains.kotlin.types.typeUtil.containsError +import org.jetbrains.kotlin.utils.checkWithAttachment import java.awt.Color import java.util.* import kotlin.reflect.KClass @@ -519,9 +520,13 @@ abstract class KotlinParameterInfoWithCallHandlerBase= currentArgumentIndex) { - "currentArgumentIndex: $currentArgumentIndex has to be not more than number of arguments ${arguments.size}" - } + checkWithAttachment( + arguments.size >= currentArgumentIndex, + lazyMessage = { "currentArgumentIndex: $currentArgumentIndex has to be not more than number of arguments ${arguments.size}" }, + attachments = { + it.withAttachment("info.txt", info) + } + ) val callToUse: ResolvedCall val currentArgument = if (arguments.size > currentArgumentIndex) {