Generate linenumber for goto instruction in while (KT-13059)
Otherwise linenumber for previous instruction will be used in debugger. That can lead to error stepping because it might be line that isn't reachable on current iteration. #KT-13059 Fixed
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at stepOverFalseConditionInLastIfInWhile.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! stepOverFalseConditionInLastIfInWhile.StepOverFalseConditionInLastIfInWhileKt
|
||||
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
stepOverFalseConditionInLastIfInWhile.kt:13
|
||||
stepOverFalseConditionInLastIfInWhile.kt:6
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
Process finished with exit code 0
|
||||
@@ -29,7 +29,6 @@ stepOverWhileWithInline.kt:30
|
||||
stepOverWhileWithInline.kt:35
|
||||
stepOverWhileWithInline.kt:41
|
||||
stepOverWhileWithInline.kt:35
|
||||
stepOverWhileWithInline.kt:36
|
||||
stepOverWhileWithInline.kt:38
|
||||
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
|
||||
|
||||
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
package stepOverFalseConditionInLastIfInWhile
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
var i = 0
|
||||
|
||||
while (true) {
|
||||
if (i > 0) {
|
||||
break
|
||||
}
|
||||
i++
|
||||
|
||||
//Breakpoint!
|
||||
if (testSome()) {
|
||||
some()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun testSome(): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
fun some() {}
|
||||
Reference in New Issue
Block a user