Skip to content

Fix forgetting static property access after impure call #3950

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

Merged
merged 15 commits into from
Apr 20, 2025
Merged
Prev Previous commit
Next Next commit
Update NodeScopeResolver.php
  • Loading branch information
staabm committed Apr 20, 2025
commit 5725c3a1555a91564f33108f749dd8f139220231
2 changes: 1 addition & 1 deletion src/Analyser/NodeScopeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -2598,7 +2598,7 @@ static function (): void {
}

if (
$parametersAcceptor instanceof ClosureType && $parametersAcceptor->getReturnType()->isVoid()->yes()
$parametersAcceptor instanceof ClosureType && count($parametersAcceptor->getImpurePoints()) > 0
&& $scope->isInClass()
) {
$scope = $scope->invalidateExpression(new Variable('this'), true);
Expand Down