From cc3f1b35010978af9e9c355e215f3ff22811cbc3 Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Wed, 24 Jul 2019 22:18:05 +0900 Subject: [PATCH] Debugger: Fix exception in "Smart step into" for Java method calls (KT-32813) --- .../idea/debugger/stepping/KotlinSmartStepIntoHandler.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSmartStepIntoHandler.kt b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSmartStepIntoHandler.kt index 0065473a2dd..005a69d7eda 100644 --- a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSmartStepIntoHandler.kt +++ b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSmartStepIntoHandler.kt @@ -183,8 +183,8 @@ class KotlinSmartStepIntoHandler : JvmSmartStepIntoHandler() { val declaration = DescriptorToSourceUtilsIde.getAnyDeclaration(file.project, descriptor) if (descriptor.isFromJava) { - (declaration as? PsiMethod)?.let { - result.add(MethodSmartStepTarget(it, null, declaration, false, lines)) + if (declaration is PsiMethod) { + result.add(MethodSmartStepTarget(declaration, null, expression, false, lines)) } } else { if (declaration == null && !isInvokeInBuiltinFunction(descriptor)) {