Do not show Smart Step Into targets for @InlineOnly callables (KT-33728)
This commit is contained in:
+6
@@ -19,6 +19,7 @@ import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.analyze
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.resolveToCall
|
||||
import org.jetbrains.kotlin.idea.codeInsight.DescriptorToSourceUtilsIde
|
||||
import org.jetbrains.kotlin.idea.debugger.breakpoints.isInlineOnly
|
||||
import org.jetbrains.kotlin.idea.project.platform
|
||||
import org.jetbrains.kotlin.idea.util.application.runReadAction
|
||||
import org.jetbrains.kotlin.load.java.isFromJava
|
||||
@@ -185,6 +186,11 @@ class SmartStepTargetVisitor(
|
||||
}
|
||||
}
|
||||
|
||||
// We can't step into @InlineOnly callables as there is no LVT, so skip them
|
||||
if (declaration is KtCallableDeclaration && declaration.isInlineOnly()) {
|
||||
return
|
||||
}
|
||||
|
||||
val callLabel = KotlinMethodSmartStepTarget.calcLabel(descriptor)
|
||||
val label = when (descriptor) {
|
||||
is FunctionInvokeDescriptor -> {
|
||||
|
||||
+5
@@ -103,6 +103,11 @@ public class SmartStepIntoTestGenerated extends AbstractSmartStepIntoTest {
|
||||
runTest("idea/jvm-debugger/jvm-debugger-test/testData/smartStepInto/infixCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlineOnly.kt")
|
||||
public void testInlineOnly() throws Exception {
|
||||
runTest("idea/jvm-debugger/jvm-debugger-test/testData/smartStepInto/inlineOnly.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("inlinedFunLiteral.kt")
|
||||
public void testInlinedFunLiteral() throws Exception {
|
||||
runTest("idea/jvm-debugger/jvm-debugger-test/testData/smartStepInto/inlinedFunLiteral.kt");
|
||||
|
||||
@@ -41,4 +41,4 @@ class L {
|
||||
}
|
||||
}
|
||||
|
||||
// EXISTS: println(Any?), constructor B(), constructor C(Int), constructor D(), constructor E(Int), constructor F(), constructor G(Int), constructor J(), constructor K(Int), constructor L()
|
||||
// EXISTS: constructor B(), constructor C(Int), constructor D(), constructor E(Int), constructor F(), constructor G(Int), constructor J(), constructor K(Int), constructor L()
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo() {
|
||||
val a = mutableListOf("A", "B").also { it.add("C") }<caret>
|
||||
val b = a
|
||||
}
|
||||
|
||||
// EXISTS: mutableListOf(vararg String)
|
||||
// EXISTS: also: block.invoke()
|
||||
@@ -2,4 +2,6 @@ fun foo() {
|
||||
arrayListOf(1, 2).count()<caret>
|
||||
}
|
||||
|
||||
fun <T> List<T>.count(): Int = size
|
||||
|
||||
// EXISTS: arrayListOf(vararg Int), count()
|
||||
Reference in New Issue
Block a user