typetools / typetools/checker-framework

CFGBuilder#findOwner for static/instance initializers

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

@wmdietl is already working on this.

Since Jul 9, 2020.

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

Description

A follow-up to #3442: the temporary variable for a pre-/post-increment in a static/instance initializer is created as a field instead of as a local variable.
This suggest that the findOwner call at https://github.com/typetools/checker-framework/blob/dc530c37903c608f02e6adea752425eae7f06baf/dataflow/src/main/java/org/checkerframework/dataflow/cfg/CFGBuilder.java#L4752 returned the surrounding class instead of the init/clinit methods.
#3442 has a simpler fix, but we should investigate whether findOwner is appropriately handling initializers.

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.