KT-4982 this$0 is not initialized in the anonymous object

#KT-4982 Fixed
This commit is contained in:
Mikhael Bogdanov
2014-05-13 17:52:35 +04:00
parent 5d6b4d641b
commit 6fb0050575
5 changed files with 37 additions and 12 deletions
@@ -0,0 +1,21 @@
abstract class WaitFor {
{
condition()
}
abstract fun condition() : Boolean;
}
fun box(): String {
val local = ""
var result = "fail"
val s = object: WaitFor() {
override fun condition(): Boolean {
result = "OK"
return result.length == 2
}
}
return result;
}