typetools / typetools/checker-framework

The syntax of @Covariant is ugly

Open
#1,969 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
1.1k
Forks
440
Avg merge
1d 12h
Merged PRs (30d)
134

Description

The current syntax of @Covariant is:

@Covariant(0)
public interface Getter<R> {
    R get();
}

It would look nicer, and be easier to understand, like this:

public interface Getter<@Covariant R> {
    R get();
}

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

The issue names the @Covariant annotation and the Getter example, but no source file or test. Start by locating the annotation declaration and the entry points that parse or validate type-use annotations; done means the proposed inline syntax is accepted and existing @Covariant behavior remains covered by tests.

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
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.