Evaluator: Allow to evaluate expression on synthetic lines in .kt files

This commit is contained in:
Yan Zhulanow
2019-02-21 00:52:19 +03:00
parent 16266259f5
commit cadb70f64a
4 changed files with 35 additions and 2 deletions
@@ -0,0 +1,18 @@
package dataClassCopy
fun main() {
val a = Foo("foo")
//Breakpoint!
a.copy("bar")
}
data class Foo(val a: String)
// STEP_INTO: 1
// STEP_OUT: 1
// EXPRESSION: Foo("baz")
// RESULT: instance of dataClassCopy.Foo(id=ID): LdataClassCopy/Foo;
// EXPRESSION: a
// RESULT: Unresolved reference: a
@@ -0,0 +1,10 @@
LineBreakpoint created at dataClassCopy.kt:6
Run Java
Connected to the target VM
dataClassCopy.kt:6
dataClassCopy.kt:9
dataClassCopy.kt:-1
Compile bytecode for Foo("baz")
Disconnected from the target VM
Process finished with exit code 0