EDIT: nevermind, I'm an idiot, used the setter `fi...
# announcements
d
EDIT: nevermind, I'm an idiot, used the setter
field
, of course he force me to initialize Why does the compiler force me to initialize a variable that is never actually read? the
get()
doesn't ever expose the actual value of
entries
but if I do not include
= null
it complain with
property must be initialized
I might be wrong but I kinda remember it didn't worked like that a couple of months ago (previous versions)
w
Aren’t you accessing the field in
if (actual != field)
?
If you don’t initialize it inline and call the setter, you’d have to compare with an uninitialized field
d
nevermind, I'm an idiot 😄 i used the
field = actual
thanks for taking the time to answer me @wasyl
👍 1