Evaluate: Fix for evaluating local variables captured by an inline function (KT-17514)
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package kt17514
|
||||
|
||||
fun <T> checkSucceeds(callable: () -> T) = callable()
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val isPresent = true
|
||||
val isPresent2 = true
|
||||
val expectedLibs = listOf("aa", "bb", "cc")
|
||||
expectedLibs
|
||||
.forEach {
|
||||
checkSucceeds {
|
||||
val isPresent2 = false
|
||||
//Breakpoint!
|
||||
val v = isPresent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// EXPRESSION: isPresent
|
||||
// RESULT: 1: Z
|
||||
|
||||
// EXPRESSION: isPresent2
|
||||
// RESULT: 0: Z
|
||||
@@ -0,0 +1,11 @@
|
||||
LineBreakpoint created at kt17514.kt:14
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
kt17514.kt:14
|
||||
Compile bytecode for isPresent
|
||||
Compile bytecode for isPresent2
|
||||
kt17514.kt:14
|
||||
resuming kt17514.kt:14
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Reference in New Issue
Block a user