Debugger: Fix breakpoints on if/loops with constant conditions (KT-14421)
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
package constantConditions
|
||||
|
||||
fun main() {
|
||||
trueIf()
|
||||
falseIf()
|
||||
elseIf()
|
||||
whileFalse()
|
||||
whileTrue()
|
||||
}
|
||||
|
||||
private fun trueIf() {
|
||||
//Breakpoint!
|
||||
if (true)
|
||||
foo("true")
|
||||
else
|
||||
foo("false")
|
||||
}
|
||||
|
||||
private fun falseIf() {
|
||||
//Breakpoint!
|
||||
if(false)
|
||||
foo("false")
|
||||
else
|
||||
foo("true")
|
||||
}
|
||||
|
||||
private fun elseIf() {
|
||||
//Breakpoint!
|
||||
if (false)
|
||||
foo("false")
|
||||
//Breakpoint!
|
||||
else if (true)
|
||||
foo("true")
|
||||
}
|
||||
|
||||
|
||||
private fun whileFalse() {
|
||||
//Breakpoint!
|
||||
while (false)
|
||||
foo("while false")
|
||||
}
|
||||
|
||||
|
||||
private fun whileTrue() {
|
||||
//Breakpoint!
|
||||
while (true)
|
||||
break
|
||||
}
|
||||
|
||||
private fun foo(text: String) {}
|
||||
|
||||
// RESUME: 6
|
||||
@@ -0,0 +1,17 @@
|
||||
LineBreakpoint created at constantConditions.kt:13
|
||||
LineBreakpoint created at constantConditions.kt:21
|
||||
LineBreakpoint created at constantConditions.kt:29
|
||||
LineBreakpoint created at constantConditions.kt:32
|
||||
LineBreakpoint created at constantConditions.kt:39
|
||||
LineBreakpoint created at constantConditions.kt:46
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
constantConditions.kt:13
|
||||
constantConditions.kt:21
|
||||
constantConditions.kt:29
|
||||
constantConditions.kt:32
|
||||
constantConditions.kt:39
|
||||
constantConditions.kt:46
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Reference in New Issue
Block a user