typetools / typetools/checker-framework

WholeProgramInference and the new LambdaResultExpressionNode

Open
#1,607 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

https://github.com/typetools/checker-framework/pull/1516 added the new LambdaResultExpressionNode for lambdas with an expression as body.

WholeProgramInference has special handling for normal returns, in
org.checkerframework.framework.flow.CFAbstractTransfer.visitReturn(ReturnNode, TransferInput<V, S>).
I'm wondering whether visitLambdaResultExpression requires similar special handling for WPI.

The annotation would be written on the declaration of the functional interface, not on the lambda expression.

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 reading CFAbstractTransfer.visitReturn(ReturnNode, TransferInput<V, S>) and locate the corresponding visitLambdaResultExpression handling in WholeProgramInference. Compare how normal returns propagate annotations, then determine whether expression-bodied lambdas need equivalent handling on the functional-interface declaration. Done means the WPI behavior and any required change are verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers, devtools
Issue type
Bug
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.