Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@TargetLocations on a type qualifier has no effect. #3495

Closed
t-rasmud opened this issue Jul 22, 2020 · 1 comment
Closed

@TargetLocations on a type qualifier has no effect. #3495

t-rasmud opened this issue Jul 22, 2020 · 1 comment

Comments

@t-rasmud
Copy link
Contributor

The type qualifier @LowerBoundBottom in the index checker is annotated with the meta annotation @TargetLocations({TypeUseLocation.EXPLICIT_LOWER_BOUND, TypeUseLocation.EXPLICIT_UPPER_BOUND}).
This implies that @LowerBoundAnnotation should not be written by programmers in locations other than explicit bounds.

Consider the following test case:

import org.checkerframework.checker.index.qual.LowerBoundBottom;

public class InvalidBottom {
    void test(@LowerBoundBottom int x) {}
}

Running the index checker on this example with the command javac -processor index checker/tests/index/InvalidBottom.java doesn't report any warning. This is incorrect because @LowerBoundBottom should not be allowed to be written explicitly on a parameter type.

@wmdietl
Copy link
Member

wmdietl commented Jul 22, 2020

There already is an issue for this: #1919. Can you work on fixing this?

@wmdietl wmdietl closed this as completed Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants