typetools / typetools/checker-framework

Member reference: pre and post conditions should be part of function type

Open
#801 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

False Negative (missing warning or unsoundness) Java8
Dominant language
Java
Stars
1.1k
Forks
440
Avg merge
1d 12h
Merged PRs (30d)
134

Description

When comparing the types of method references, the the pre- and post-conditions should be considered.

In contexts such as pseudo-assignments, the pre- and post-conditions should be checked like they are when checking method overriding. Although some may not be useful because post conditions generally refer to fields (but there will be no shared fields). See test case in checker/tests/nullness/java8/methodref/Postconditions.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.

Research direction

Start with checker/tests/nullness/java8/methodref/Postconditions.java, the referenced test case for method references. Trace how pseudo-assignments compare method-reference types and how method overriding checks pre- and post-conditions. Done means those conditions are considered consistently in method-reference type comparisons, with the test case passing.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.