Paul Caswell
05/22/2019, 9:53 AMribesg
05/22/2019, 10:27 AMmaster
before data
master
stays null during the entire execution of the abstract class constructorI know theIt’s completely wrong, these two are two very different things:is unnecessaryget()
val x: Int get() = y
val x: Int = y
Paul Caswell
05/22/2019, 10:52 AMhash
, not during construction - or am I way out here? Note that this is an abstract
and there is
a master
at that time is there not?
So what is the difference and why does changing data
make hash
work?ribesg
05/22/2019, 11:07 AMmaster
is null in case you didn’t seePaul Caswell
05/22/2019, 1:22 PMmaster
is null
when I request the hash
and that is long after the actual object has finished construction.
object FooImageData : ImageData() {
override val master = listOf(
"424d3684030000000000..."
// ...
)
}
ribesg
05/22/2019, 1:48 PMhash
Paul Caswell
05/22/2019, 2:21 PMWell that’s just not possibleMy feelings exactly! Which is why I chose to ask here. 🙂