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

Allow undefined variable detection in arrow functions #5343

Merged
merged 1 commit into from
Mar 11, 2021

Conversation

weirdan
Copy link
Collaborator

@weirdan weirdan commented Mar 8, 2021

Previously Psalm would assume that any variable it sees in the arrow function body is defined (and mixed, if it's not available in the outer scope). This prevented undefined variable detection. Dropping that assumption allows it to work.

Fixes #5331

Previously Psalm would assume that any variable it sees in the arrow
function body is defined (and mixed, if it's not available in the outer
scope). This prevented undefined variable detection. Dropping that
assumption allows it to work.

Fixes vimeo#5331
@weirdan weirdan requested a review from muglug March 8, 2021 10:36
@muglug muglug merged commit 7138678 into vimeo:master Mar 11, 2021
@muglug
Copy link
Collaborator

muglug commented Mar 11, 2021

Thanks!

This was referenced Mar 15, 2021
This was referenced Mar 17, 2021
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.

Undefined variables in string interpolation are not being caught
2 participants