-
Notifications
You must be signed in to change notification settings - Fork 546
Preserve already resolved types after scope re-creation #4677
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
base: 2.1.x
Are you sure you want to change the base?
Conversation
src/Analyser/MutatingScope.php
Outdated
| foreach($preservedTypes as $exprStringToInvalidate => $resolvedType) { | ||
| foreach ($expressionTypes as $exprString => $exprTypeHolder) { |
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.
we cannot use similar logic as in invalidateExpression because we don't know the Expr which $this->resolvedTypes was resolved with
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.
I have a commit that puts ExpressionTypeHolder into resolvedTypes, do you want it?
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.
Might help. Sure why not :-).
Will be afk for a few hours now
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.
I pushed it to 2.1.x. If it doesn't help you in the end, or if this PR does not lead to performance improvements, I'll revert it.
implements the idea described in #4648 (comment)
requires #4676