I have created a kotlin intdef annotation .But it does not show inspections when used before parameter.When I created annotation with java.it is showing inspections but with kotlin does not show.what is the problem here?
const val TIP_A = 1
const val TIP_B = 2 const val TIP_C = 3
@IntDef(TIP_A, TIP_B, TIP_C)
@Target(AnnotationTarget.VALUE_PARAMETER,AnnotationTarget.FUNCTION,AnnotationTarget.FIELD,AnnotationTarget.CLASS)
@Retention(AnnotationRetention.SOURCE)
annotation class TipId
fun checkPerm(@TipId perm : Int) : Int {
return TIP_A
}
val a = checkPerm(12) //this function not show inspections why?
with java code
@Retention(SOURCE)
@IntDef({NAVIGATION_MODE_STANDARD, NAVIGATION_MODE_LIST, NAVIGATION_MODE_TABS})
public @interface NavigationMode {
public static final int NAVIGATION_MODE_STANDARD = 0;
public static final int NAVIGATION_MODE_LIST = 1;
public static final int NAVIGATION_MODE_TABS = 2;
fun checkPerm(@NavigationMode perm : Int) : Int {
return TIP_A
}
val a = checkPerm(12)//this code showing must be one of ... inspections