-
Notifications
You must be signed in to change notification settings - Fork 530
refactor arrow function scope logic to make it consistent with anonym… #1935
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
refactor arrow function scope logic to make it consistent with anonym… #1935
Conversation
38f01d3
to
a59c5f9
Compare
My thinking is that, |
Does this change anything in type inference? Should there be a test? |
continue; | ||
} | ||
|
||
$conditionalExpressions[$conditionalExprString] = $newHolders; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line was never called because of the above foreach in line 3028.
} | ||
} | ||
|
||
$newHolders[] = $holder; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is always newHolders === holders because of the continue 3
foreach ($parameterVariableExpressions as $expr) { | ||
$scope = $scope->invalidateExpression($expr, true); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is handled in assignVariable
's invalidateExpression
From the investigations above, I believe using |
Alright, great, thank you :) |
…ous functions
Refactor anonymous function scope to use invalidate logic of assignVariable instead of the duplication.
This makes the logic consistent with
#1934