Hi everyone, I'm trying to declare a variable with...
# android
j
Hi everyone, I'm trying to declare a variable with a custom getter, that's because I'm gonna calculate the value of that variable, but I'm getting this error
Property must be initialized
and I dunno if that's something I'm doing wrong. I think it isn't, but if someone could just confirm it... it'd be something like this
var currentDate get() = Date()
(not what I'm doing, but it also errors) but from the doc, the initializer is optional if the type can be inferred from the getter