typetools / typetools/checker-framework
Fenum Checker: disallow invocation of comparisons methods with mixed types
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
Disallow invocation of comparisons methods with mixed types. For example, the type of the receiver and the parameter to equals should have the same fenum qualifier.
@Fenum(A) Integer a;
@Fenum(A) Integer a2;
@Fenum(B) Integer b;
@FenumUnqualified Integer u;
a.equals(u); // error
a.equals(b); // error
a.equals(a2); // ok
a.hashCode(); // ok
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 locating the Fenum checker and its handling of equals, comparison methods, and hashCode; the issue examples define the expected cases. Add or update checker tests so mixed Fenum qualifiers are rejected, matching qualifiers are accepted, and hashCode remains allowed. Done means these examples are checked consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100