typetools / typetools/checker-framework

ForwardAnalysisImpl.getReturnStatementStores() only works for methods with non-void return type

Open
#3,416 0 comments 0 reactions 1 assignee View on GitHub

@wmdietl is already working on this.

Since Jul 23, 2020.

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

Description

Currently, ForwardAnalysisImpl.getReturnStatementStores() only returns store information for return statements in methods with a non-void return type. This is not currently documented in the ForwardAnalysis Javadoc:

https://github.com/typetools/checker-framework/blob/447a902d09dc593430432598b0a5617572fee86e/dataflow/src/main/java/org/checkerframework/dataflow/analysis/ForwardAnalysis.java#L23

IMO it would make more sense if this method worked for any return statement, including those in void methods. But at the least, the current behavior should be documented.

/cc @wmdietl

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.