Add more diagnostics to tackle exception in KotlinFunctionParameterInfoHandler
Relates to #EA-221900
This commit is contained in:
committed by
Vladimir Dolzhenko
parent
87e70cf690
commit
b5b319803b
+8
-3
@@ -62,6 +62,7 @@ import org.jetbrains.kotlin.resolve.scopes.receivers.ReceiverValue
|
|||||||
import org.jetbrains.kotlin.types.KotlinType
|
import org.jetbrains.kotlin.types.KotlinType
|
||||||
import org.jetbrains.kotlin.types.isError
|
import org.jetbrains.kotlin.types.isError
|
||||||
import org.jetbrains.kotlin.types.typeUtil.containsError
|
import org.jetbrains.kotlin.types.typeUtil.containsError
|
||||||
|
import org.jetbrains.kotlin.utils.checkWithAttachment
|
||||||
import java.awt.Color
|
import java.awt.Color
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.reflect.KClass
|
import kotlin.reflect.KClass
|
||||||
@@ -519,9 +520,13 @@ abstract class KotlinParameterInfoWithCallHandlerBase<TArgumentList : KtElement,
|
|||||||
|
|
||||||
val arguments = info.arguments
|
val arguments = info.arguments
|
||||||
|
|
||||||
assert(arguments.size >= currentArgumentIndex) {
|
checkWithAttachment(
|
||||||
"currentArgumentIndex: $currentArgumentIndex has to be not more than number of arguments ${arguments.size}"
|
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<FunctionDescriptor>
|
val callToUse: ResolvedCall<FunctionDescriptor>
|
||||||
val currentArgument = if (arguments.size > currentArgumentIndex) {
|
val currentArgument = if (arguments.size > currentArgumentIndex) {
|
||||||
|
|||||||
Reference in New Issue
Block a user