https://kotlinlang.org logo
k

Kroppeb

06/04/2019, 10:05 AM
Can a non-null property have a nullable field?
t

thana

06/04/2019, 10:10 AM
property and field are synonymous in my world - can you rephrase the question? 😄
k

Kroppeb

06/04/2019, 10:10 AM
sorry, i meant the backing field
Or should i just add my own private var?
g

gildor

06/04/2019, 10:11 AM
yes, just create backing field
k

Kroppeb

06/04/2019, 10:13 AM
Now i'm having issues with invariance
ugh why did i add that in the first place
Oh, forgot to make it private: facepalm
if the setter is private; should that also allow variance
s

sulemankhan447

06/04/2019, 11:26 AM
It cany have
14 Views