typetools / typetools/checker-framework

Enforce correct use of @Covariant

Open
#1,971 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.