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
If qualifier Q has a @TargetLocations meta-annotation and the programmer writes @Q at any location that is not listed in Q's @TargetLocations meta-annotation, then the Checker Framework should issue a warning. This warning may be suppressed (say, for making default annotations explicit in test cases).
(Issue ported from #515 which had become cluttered with other discussion.)
The text was updated successfully, but these errors were encountered:
@mernst@smillst
Fixing this issue, I wanted to ask if some annotations need more @TargetLocations arguments.
For example, @BottomVal can be used on parameters too, even though it doesn't have TypeUseLocation.PARAMETER as argument to @TargetLocations (on fields too).
You can see my progress here: my branch (any opinion about it before opening the PR against CF master would be appreciated). Thank you!
@Maxi17 It's possible that some annotations need more target locations, but I don't think @BottomVal is one of them. Note the target locations specify where an annotation may be written by a programmer, but a type system by refine or default regardless of the target location of a qualifier. So, your code should check for annotations explicitly written on trees, not that AnnotatedTypeMirror for elements. See the code in org.checkerframework.checker.lock.LockVisitor#issueErrorIfGuardSatisfiedAnnotationInUnsupportedLocation for an example.
If qualifier Q has a
@TargetLocations
meta-annotation and the programmer writes@Q
at any location that is not listed in Q's@TargetLocations
meta-annotation, then the Checker Framework should issue a warning. This warning may be suppressed (say, for making default annotations explicit in test cases).(Issue ported from #515 which had become cluttered with other discussion.)
The text was updated successfully, but these errors were encountered: