You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is something that's included (at least in parts) in the base library, and it would be nice to have here.
This issue will have to be dealt with once Android Studio 3.0 is stable, since as of Canary 9, checks for these annotations don't seem to work when calling the annotated methods from Kotlin.
Update: Android Studio 3 is now stable, but the issue still remains, misusing properties that have these annotations doesn't produce any lint warnings.
Update 2: here is an unanswered StackOverflow issue for the same problem.
Another update: as of AS 3.1 Beta 1, Java annotations generate lint warnings at Kotlin use sites, but resource annotations in Kotlin code still have no effect.
Seems like this only an issue with property setters, as function parameters annotated with these annotations in Kotlin code work as expected, for example, this generates lint warnings for hardcoded int values:
This is something that's included (at least in parts) in the base library, and it would be nice to have here.
This issue will have to be dealt with once Android Studio 3.0 is stable, since as of Canary 9, checks for these annotations don't seem to work when calling the annotated methods from Kotlin.Update: Android Studio 3 is now stable, but the issue still remains, misusing properties that have these annotations doesn't produce any lint warnings.
Update 2: here is an unanswered StackOverflow issue for the same problem.
Example of what needs to be done:
Example of what Studio should mark as an error:
Example of what Studio marks as a warning in Java as of 3.0 Canary 9:
The text was updated successfully, but these errors were encountered: