Using java thread annotations on kotlin properties

Viewed 12

I am using java annotations @UiThread @AnyThread @WorkerThread that help me to better understand my code and also notify me not supposed thread call of method. Howwhere there is BIG limitations that ruins whole purpose that I cannnot use them on properties:

@UiThread
val order get() = value.order

Gives:

This annotation is not applicable to target 'member property without backing field or delegate'

Is there no any other library with some preprocessor or anything other that just solve this little issue ? This looks to me like unfinished language feature. Looks like they where not supposed for kotlin maybe ? So kotlin has no way of being working with this correctly ?

1 Answers
Related