Debugger: Fix evaluation of lambda arguments (KT-10636)
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
package lambdaParameters
|
||||
|
||||
fun fun1(p: String, f: (String) -> Int) {
|
||||
//Breakpoint!
|
||||
f(p)
|
||||
}
|
||||
|
||||
inline fun fun2(p: String, crossinline f: (String) -> Int) {
|
||||
//Breakpoint!
|
||||
f(p)
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
fun1("abc", { x -> x.length })
|
||||
fun2("abc", { x -> x.length })
|
||||
}
|
||||
|
||||
// EXPRESSION: f("abc")
|
||||
// RESULT: 3: I
|
||||
|
||||
// EXPRESSION: f("abc")
|
||||
// RESULT: Evaluation of 'crossinline' lambdas is not supported
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
LineBreakpoint created at lambdaParameters.kt:5
|
||||
LineBreakpoint created at lambdaParameters.kt:10
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
lambdaParameters.kt:5
|
||||
Compile bytecode for f("abc")
|
||||
lambdaParameters.kt:10
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Reference in New Issue
Block a user