typetools / typetools/checker-framework
WholeProgramInference and the new LambdaResultExpressionNode
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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