Fix smart step into functions with expression body
This commit is contained in:
@@ -62,7 +62,7 @@ public class KotlinSmartStepIntoHandler : JvmSmartStepIntoHandler() {
|
|||||||
val doc = PsiDocumentManager.getInstance(file.getProject()).getDocument(file) ?: return emptyList()
|
val doc = PsiDocumentManager.getInstance(file.getProject()).getDocument(file) ?: return emptyList()
|
||||||
|
|
||||||
val lines = Range(doc.getLineNumber(elementTextRange.getStartOffset()), doc.getLineNumber(elementTextRange.getEndOffset()))
|
val lines = Range(doc.getLineNumber(elementTextRange.getStartOffset()), doc.getLineNumber(elementTextRange.getEndOffset()))
|
||||||
val bindingContext = element.analyze()
|
val bindingContext = element.analyzeFully()
|
||||||
val result = OrderedSet<SmartStepTarget>()
|
val result = OrderedSet<SmartStepTarget>()
|
||||||
|
|
||||||
// TODO support class initializers, local functions, delegated properties with specified type, setter for properties
|
// TODO support class initializers, local functions, delegated properties with specified type, setter for properties
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
fun foo() = <caret>bar()
|
||||||
|
|
||||||
|
fun bar() = 1
|
||||||
|
|
||||||
|
// EXISTS: bar()
|
||||||
@@ -101,6 +101,12 @@ public class SmartStepIntoTestGenerated extends AbstractSmartStepIntoTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("funWithExpressionBody.kt")
|
||||||
|
public void testFunWithExpressionBody() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/funWithExpressionBody.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("if.kt")
|
@TestMetadata("if.kt")
|
||||||
public void testIf() throws Exception {
|
public void testIf() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/if.kt");
|
String fileName = JetTestUtils.navigationMetadata("idea/testData/debugger/smartStepInto/if.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user