Is there some sneaky way to use eg. @IntDef annotation for fun return type in Kotlin? I checked out the topic a little bit, found Kotlin target annotations enum etc., but seems like they are not handled by lint in Android Studio. Can someone confirm on that or am I missing sth?
a
Arjun Achatz
01/06/2020, 1:33 PM
Wouldn't an inline class be a better solution ?
➕ 2
s
stantronic
01/06/2020, 1:45 PM
Pretty sure if you use a regular enum, R8 will convert it to an int at compile time, if you are not using any of the fancy enum features
👍 1
k
Karolo
01/07/2020, 10:22 AM
Maybe I misdescribed my intentions, I meant @IdRes. They seem to be incompatible when mixing Kotlin with Java.