Allow only one invoke to be a target for smart step into (KT-18632)
It's difficult to distinguish such calls reliably in debug session #KT-18632 Fixed
This commit is contained in:
+18
-5
@@ -14,11 +14,12 @@ fun defaultParameter(f: (String) -> Int = { it.toInt() }) {
|
||||
f("12")
|
||||
}
|
||||
|
||||
fun badSignatureIsSkipped(f: (String) -> Int = { it.toInt() }, paramFun: (Int) -> Int) {
|
||||
// Minor bug is here. During selection paramFun() is shown as a target, but f is called instead.
|
||||
fun firstInvokeIsCalled(f: (String) -> Int = { it.toInt() }, paramFun: (Int) -> Int) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 0
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
paramFun(f("12"))
|
||||
paramFun(f("12")) + ii()
|
||||
}
|
||||
|
||||
fun nonDefaultWithAnonymousFun(paramFun: (Int) -> Int) {
|
||||
@@ -35,16 +36,28 @@ fun withExtensionParameters(paramFun: Int.() -> Int) {
|
||||
12.paramFun()
|
||||
}
|
||||
|
||||
fun <T> genericSignatureAndExtensionArgument(v: T, paramFun: (T) -> T) {
|
||||
// SMART_STEP_INTO_BY_INDEX: 0
|
||||
// RESUME: 1
|
||||
//Breakpoint!
|
||||
paramFun(v)
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val localFun : (Int) -> Int = { it + 1 }
|
||||
val localFun: (Int) -> Int = { it + 1 }
|
||||
|
||||
nonDefaultParameter(localFun)
|
||||
|
||||
defaultParameter()
|
||||
|
||||
badSignatureIsSkipped { it + 1 }
|
||||
firstInvokeIsCalled { it + 1 }
|
||||
|
||||
nonDefaultWithAnonymousFun(fun (i: Int): Int { return i })
|
||||
|
||||
withExtensionParameters { this }
|
||||
}
|
||||
|
||||
val ext: Int.() -> Int = { this }
|
||||
genericSignatureAndExtensionArgument(15, ext)
|
||||
}
|
||||
|
||||
fun ii() = 12
|
||||
+13
-10
@@ -1,20 +1,23 @@
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:7
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:14
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:21
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:28
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:35
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:22
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:29
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:36
|
||||
LineBreakpoint created at smartStepIntoToLambdaParameter.kt:43
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
smartStepIntoToLambdaParameter.kt:7
|
||||
smartStepIntoToLambdaParameter.kt:39
|
||||
smartStepIntoToLambdaParameter.kt:47
|
||||
smartStepIntoToLambdaParameter.kt:14
|
||||
smartStepIntoToLambdaParameter.kt:10
|
||||
smartStepIntoToLambdaParameter.kt:21
|
||||
smartStepIntoToLambdaParameter.kt:45
|
||||
smartStepIntoToLambdaParameter.kt:28
|
||||
smartStepIntoToLambdaParameter.kt:47
|
||||
smartStepIntoToLambdaParameter.kt:35
|
||||
smartStepIntoToLambdaParameter.kt:49
|
||||
smartStepIntoToLambdaParameter.kt:22
|
||||
smartStepIntoToLambdaParameter.kt:18
|
||||
smartStepIntoToLambdaParameter.kt:29
|
||||
smartStepIntoToLambdaParameter.kt:55
|
||||
smartStepIntoToLambdaParameter.kt:36
|
||||
smartStepIntoToLambdaParameter.kt:57
|
||||
smartStepIntoToLambdaParameter.kt:43
|
||||
smartStepIntoToLambdaParameter.kt:59
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
|
||||
Reference in New Issue
Block a user