Skip to content

Commit 99accfb

Browse files
committed
Track object aliases on the scope so property writes and calls reach every alias
$c = $a stores an ObjectAliasExpr edge, like the by-reference tracking of IntertwinedVariableByReferenceWithExpr. A property write through one side updates the remembered fact about the same property on the other side, an impure call forgets the facts of every alias, and two variables linked by certain edges make $a === $c always true. Amp-Thread-ID: https://ampcode.com/threads/T-01a17eac-1199-74a6-b3f7-dfbd8a084465
1 parent 58d53fb commit 99accfb

14 files changed

Lines changed: 1768 additions & 350 deletions

File tree

‎src/Analyser/ExprHandler/AssignHandler.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,7 @@ public function applyWrite(
13881388
$nativeType,
13891389
TrinaryLogic::createYes(),
13901390
[],
1391-
);
1391+
)->assignObjectAlias($var->name, $assignedExpr);
13921392
foreach ($conditionalExpressions as $exprString => $holders) {
13931393
$scope = $scope->addConditionalExpressions((string) $exprString, $holders);
13941394
}

0 commit comments

Comments
 (0)