eclipse-jdt / eclipse-jdt/eclipse.jdt.core
Could LambdaExpression.analyseExceptions() cause problematic side-effects?
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
Method `LambdaExpression.analyseExceptions()` runs flow analysis ahead of time.
As per https://github.com/eclipse-jdt/eclipse.jdt.core/pull/1181#issuecomment-2013084022 I wonder, whether this could cause side-effects *outside the lambda itself* (the lambda is a throw-away AST)?
What _are_ the side effects caused by flow analysis:
- local FlowInfo, FlowContext not a problem 👍
- local bits in ASTNode.bits, not a problem, as that's only the AST copy 👍
- synthetics in outer scopes / types, for outer emulation, synthetic arguments etc.
Can it happen that along the lines of (3) analyseExceptions() will leave side effects outside the copy, which could have an ill effect on the final flow analysis?
Contributor guide
Assessment
This issue has not been assessed yet.