typetools / typetools/checker-framework
Enforce correct use of @Covariant
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
The Checker Framework should enforce correct usage of type parameters that are annotated as @Covariant, i.e. that they are only used in return positions.
If a @Contravariant annotation is added as suggested in #1970, its correct usage should also be enforced.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing handling of @Covariant and the proposed @Contravariant annotation in issue #1970. Locate the Checker Framework code and tests that validate annotation usage, then define coverage for rejecting non-return uses and, if introduced, enforcing the corresponding @Contravariant rule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100