nil2l
09/16/2017, 8:38 PMdiesieben07
09/16/2017, 8:41 PMclass Bar {
val string: String
constructor() {
string = createString(this)
}
}
fun createString(bar: Bar) = "abc"
You are leaking out an uninitialized reference to Bar
in the constructor.karelpeeters
09/16/2017, 8:43 PMnil2l
09/16/2017, 8:44 PMCannot access '<this>' before superclass constructor has been called
diesieben07
09/16/2017, 8:45 PMnil2l
09/16/2017, 8:46 PMdiesieben07
09/16/2017, 8:47 PMthis
inside the actual call to another constructor, yes.diesieben07
09/16/2017, 8:47 PMnil2l
09/16/2017, 8:49 PM