Step into functions with local variable on first line under "Skip simple getters" (KT-14488)
(cherry picked from commit 9423d65) #KT-14488 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
3f5d3e5dbc
commit
8865c0be34
@@ -46,7 +46,7 @@ class KotlinSimpleGetterProvider : SimplePropertyGetterProvider {
|
||||
val property = PsiTreeUtil.getParentOfType(element, KtProperty::class.java)
|
||||
// val a = foo()
|
||||
if (property != null) {
|
||||
return property.getter == null
|
||||
return property.getter == null && !property.isLocal
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
LineBreakpoint created at skipSimpleGetter.kt:6
|
||||
LineBreakpoint created at skipSimpleGetter.kt:8
|
||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! skipSimpleGetter.SkipSimpleGetterKt
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
skipSimpleGetter.kt:6
|
||||
skipSimpleGetter.kt:7
|
||||
skipSimpleGetter.kt:8
|
||||
skipSimpleGetter.kt:9
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at skipSimpleGetterLocalVal.kt:13
|
||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! skipSimpleGetterLocalVal.SkipSimpleGetterLocalValKt
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
skipSimpleGetterLocalVal.kt:13
|
||||
skipSimpleGetterLocalVal.kt:15
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at skipSimpleGetterMethodWithProperty.kt:5
|
||||
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! skipSimpleGetterMethodWithProperty.SkipSimpleGetterMethodWithPropertyKt
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
skipSimpleGetterMethodWithProperty.kt:5
|
||||
skipSimpleGetterMethodWithProperty.kt:10
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -1,9 +1,11 @@
|
||||
package skipSimpleGetter
|
||||
|
||||
val top = 1
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val a = A(1)
|
||||
//Breakpoint!
|
||||
a.a1 + a.a2 + a.a3 + a.a4
|
||||
a.a1 + a.a2 + a.a3 + a.a4 + top
|
||||
}
|
||||
|
||||
class A(val a4: Int) {
|
||||
@@ -21,5 +23,5 @@ class A(val a4: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
// STEP_INTO: 21
|
||||
// STEP_INTO: 3
|
||||
// SKIP_GETTERS: true
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package skipSimpleGetterLocalVal
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
class Test {
|
||||
val a2 = 12
|
||||
}
|
||||
|
||||
val t = Test()
|
||||
|
||||
val a1 = 1
|
||||
|
||||
//Breakpoint!
|
||||
a1 + t.a2 // 1
|
||||
|
||||
foo() // 2
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
// SKIP_GETTERS: true
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package skipSimpleGetterMethodWithProperty
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
//Breakpoint!
|
||||
test()
|
||||
foo()
|
||||
}
|
||||
|
||||
fun test() {
|
||||
var a = 12
|
||||
foo()
|
||||
}
|
||||
|
||||
fun foo() {}
|
||||
|
||||
// SKIP_GETTERS: true
|
||||
@@ -277,6 +277,18 @@ public class KotlinSteppingTestGenerated extends AbstractKotlinSteppingTest {
|
||||
doStepIntoTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("skipSimpleGetterLocalVal.kt")
|
||||
public void testSkipSimpleGetterLocalVal() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/skipSimpleGetterLocalVal.kt");
|
||||
doStepIntoTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("skipSimpleGetterMethodWithProperty.kt")
|
||||
public void testSkipSimpleGetterMethodWithProperty() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/skipSimpleGetterMethodWithProperty.kt");
|
||||
doStepIntoTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("stepIntoFromInlineFun.kt")
|
||||
public void testStepIntoFromInlineFun() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/stepping/stepInto/stepIntoFromInlineFun.kt");
|
||||
|
||||
Reference in New Issue
Block a user