Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in org.eclipse.jdt.internal.compiler.ast.MessageSend.analyseCode #1626

Merged
merged 1 commit into from
Nov 26, 2023

Conversation

stephan-herrmann
Copy link
Contributor

fixes #1621

What it does

Fix resolving of a synthetic lambda representing a reference expression which depends on a pattern variable.

This resolving was broken, because the synthetic lambda AST has no information about the syntactic context which may declare pattern variables depending on flow.

This is fixed by temporarily resetting AccPatternVariable just like done in Statement.resolveWithPatternVariablesInScope().

@stephan-herrmann
Copy link
Contributor Author

@jarthana FYI. Yes, Statement.resolveWithPatternVariablesInScope() is a powerful concept, but unfortunately it must be repeated for any synthetic AST (is there more of this kind lurking under the rug?).

@stephan-herrmann stephan-herrmann merged commit c13b03c into eclipse-jdt:master Nov 26, 2023
9 checks passed
@stephan-herrmann stephan-herrmann deleted the issue1621 branch November 26, 2023 16:10
@iloveeclipse
Copy link
Member

@stephan-herrmann : master is not open yet, please don't merge until official announcement

@stephan-herrmann
Copy link
Contributor Author

@stephan-herrmann : master is not open yet, please don't merge until official announcement

I'm sorry, I saw that R4_30_maintenance has been created and the freeze period check signaled OK (to my surprise actually). Also eclipse-dev gave no indication of a freeze at this point.

Feel free to revert, should a RC2a be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPE in org.eclipse.jdt.internal.compiler.ast.MessageSend.analyseCode
2 participants