Evaluate expression: add ability to evaluate expression suspending on class header

This commit is contained in:
Natalia Ukhorskaya
2014-11-06 13:25:07 +03:00
parent 4eb93c06b1
commit 55590e00a5
5 changed files with 59 additions and 0 deletions
@@ -0,0 +1,31 @@
package onClassHeader
fun main(args: Array<String>) {
val d: Base<String> = Derived()
//Breakpoint!
d.foo("")
val a = 1
}
open class Base<T> {
open fun foo(t: T): Int {
return 1
}
}
class Derived: Base<String>() {
override fun foo(t: String): Int {
return 2
}
}
// STEP_INTO: 2
// EXPRESSION: 1 + 1
// RESULT: 2: I
// EXPRESSION: this
// RESULT: instance of onClassHeader.Derived(id=ID): LonClassHeader/Derived;
// EXPRESSION: this.foo("a")
// RESULT: 2: I