Skip to content

Commit 228a0d1

Browse files
committed
fix dynamic static variant
1 parent 2e751b7 commit 228a0d1

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5749,7 +5749,7 @@ static function (): void {
57495749
} else {
57505750
// fallback
57515751
$assignedExprType = $scope->getType($assignedExpr);
5752-
$nodeCallback(new PropertyAssignNode($var, $assignedExpr, $isAssignOp), $scope);
5752+
$nodeCallback(new PropertyAssignNode($var, $assignedExpr, $isAssignOp), $scopeBeforeAssignEval);
57535753
$scope = $scope->assignExpression($var, $assignedExprType, $scope->getNativeType($assignedExpr));
57545754
}
57555755
} elseif ($var instanceof List_) {

tests/PHPStan/Rules/Properties/data/bug-13093d.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,25 @@ public function fillBucketOnce(array &$killer): int
2626

2727
}
2828

29+
final class ParallelProcessRunner
30+
{
31+
/**
32+
* @var array<int, string>
33+
*/
34+
private array $nextMutantProcessKillerContainer = [];
35+
36+
static private string $prop;
37+
38+
public function fillBucketOnce(array &$killer): int
39+
{
40+
$name = 'prop';
41+
if ($this->nextMutantProcessKillerContainer !== []) {
42+
self::${$name} = array_shift($this->nextMutantProcessKillerContainer);
43+
}
44+
45+
return 0;
46+
}
47+
48+
}
49+
50+

0 commit comments

Comments
 (0)