KT-4982 this$0 is not initialized in the anonymous object
#KT-4982 Fixed
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user