If you add lateinit
to a var
property, you do not need to initialize it
right away. So long as you assign a value to it before trying to read from it,
Kotlin will be happy. In this case, so long as we call defineTag()
to initialize
label
before calling something()
, we will be fine.
You can learn more about this in:
Tags: