typetools / typetools/checker-framework

`@MustCall` subtyping

Open
#5,760 2 comments 0 reactions 1 assignee View on GitHub

@kelloggm is already working on this.

Since Jun 22, 2023.

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

Description

This code passes the Must Call Checker:

  @MustCall({"toString"}) String foo(@MustCall({"hashCode"}) String arg) {
    return arg;
  }

However, it seems wrong to permit one @MustCall type to be permitted to be used as another.

A test case appears in MustCallSubtypingTest.java.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.