typetools / typetools/checker-framework

Separate type parameter declaration from type variable use

Open
#486 0 comments 0 reactions 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

AnnotatedTypeMirror.isDeclaration currently indicates this distinction.

It would be nicer to have a separate AnnotatedTypeParameter class that is NOT a subtype of AnnotatedTypeMirror. We could then remove AnnotatedTypeMirror.isDeclaration and use AnnotatedTypeParameter where appropriate.

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 inspecting AnnotatedTypeMirror.isDeclaration and all usages of that distinction in the Checker Framework. Trace how type parameter declarations and type variable uses are represented, then determine the affected APIs and tests. Done means the separate AnnotatedTypeParameter abstraction replaces the distinction and AnnotatedTypeMirror.isDeclaration can be removed without breaking the relevant behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.