Evaluate Expression: fix for anonymous objects - expressions where anonymous type can be replaced with super type can be evaluated

This commit is contained in:
Natalia Ukhorskaya
2014-12-02 15:28:19 +03:00
parent b056fd7e2e
commit 3ab7c6c8e9
4 changed files with 55 additions and 0 deletions
@@ -0,0 +1,19 @@
package anonymousObjects
fun main(args: Array<String>) {
val a = object: AbstractClass(1) {}
a.test(1)
}
abstract class AbstractClass(val i: Int) {
fun test(i: Int): Int {
//Breakpoint!
return i
}
}
// EXPRESSION: test(2)
// RESULT: 2: I
// EXPRESSION: i
// RESULT: 1: I