https://kotlinlang.org logo
#announcements
Title
# announcements
i

Iaroslav Postovalov

08/03/2019, 9:08 AM
hi! i have a var with an internal setter. how can i apple @PublishedApi annotation to setter to be able to call it from inlined functions?
Copy code
public lateinit var command: CommandScope
        internal set
s

sashache

08/05/2019, 1:35 PM
@ilya.gorbunov
i

ilya.gorbunov

08/05/2019, 3:43 PM
@Iaroslav Postovalov Seems that you can't now, because
@PublishedApi
isn't applicable to getters or setters. Could you file an issue about that?
Ok, I've filed https://youtrack.jetbrains.com/issue/KT-33249 myself, feel free to follow or vote.
i

Iaroslav Postovalov

08/11/2019, 9:31 AM
thanks! i checked Slack rarely in the last.
by the way, i currently use workaround with backing field.
image.png
4 Views