Preserve already resolved types after scope re-creation#4677
Preserve already resolved types after scope re-creation#4677staabm wants to merge 10 commits intophpstan:2.1.xfrom
Conversation
| foreach($preservedTypes as $exprStringToInvalidate => $resolvedType) { | ||
| foreach ($expressionTypes as $exprString => $exprTypeHolder) { |
There was a problem hiding this comment.
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.
I have a commit that puts ExpressionTypeHolder into resolvedTypes, do you want it?
There was a problem hiding this comment.
Might help. Sure why not :-).
Will be afk for a few hours now
There was a problem hiding this comment.
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.
|
remaining problem is, that we need to forget resolved type of |
|
tried a few more things but did not find something measurably better than what we have atm |
implements the idea described in #4648 (comment)
requires #4676