Is there a way to define a IntDef in Kotlin?
# android
d
Is there a way to define a IntDef in Kotlin?
g
Sure, the same as for Java, the only difference you cannot keep constants inside of annotation body (will be available on Kotlin 1.3)
d
Thank you and looking forward to 1.3!
g
But again, it's possible to define IntDef annotation even now
r
@Daniel I am using object for that currently.
d
@radityagumay Thank you for your reply! Can you elaborate a bit on your solution?
r
object Foo { const val number = 3 } @Daniel