I was also thinking of having a backing property. ...
# announcements
a
I was also thinking of having a backing property. I don't want a setter so something like:
Copy code
var countGets: Int = 0
        get() = ++field
        @Deprecated("Property is read-only", level = DeprecationLevel.ERROR)
        set(value) = throw UnsupportedOperationException()
Is probably closest to what I want. Thanks for the suggestions! Maybe delegate would be nicer, but I'm not invested in this enough right now 😛 I wonder why it's deprecated though