@@ -5947,7 +5947,6 @@ private function processAssignVar(
59475947 bool $ enterExpressionAssign ,
59485948 ): ExpressionResult
59495949 {
5950- $ this ->storeBeforeScope ($ storage , $ var , $ scope );
59515950 $ originalScope = $ scope ;
59525951 $ this ->callNodeCallback ($ nodeCallback , $ var , $ enterExpressionAssign ? $ scope ->enterExpressionAssign ($ var ) : $ scope , $ storage );
59535952 $ hasYield = false ;
@@ -5956,6 +5955,7 @@ private function processAssignVar(
59565955 $ isAlwaysTerminating = false ;
59575956 $ isAssignOp = $ assignedExpr instanceof Expr \AssignOp && !$ enterExpressionAssign ;
59585957 if ($ var instanceof Variable && is_string ($ var ->name )) {
5958+ $ this ->storeBeforeScope ($ storage , $ var , $ scope );
59595959 $ result = $ processExprCallback ($ scope );
59605960 $ hasYield = $ result ->hasYield ();
59615961 $ throwPoints = $ result ->getThrowPoints ();
@@ -6079,6 +6079,7 @@ private function processAssignVar(
60796079 if ($ enterExpressionAssign ) {
60806080 $ scope ->enterExpressionAssign ($ dimExpr );
60816081 }
6082+ $ this ->storeBeforeScope ($ storage , $ dimFetch , $ scope );
60826083 $ result = $ this ->processExprNode ($ stmt , $ dimExpr , $ scope , $ storage , $ nodeCallback , $ context ->enterDeep ());
60836084 $ hasYield = $ hasYield || $ result ->hasYield ();
60846085 $ throwPoints = array_merge ($ throwPoints , $ result ->getThrowPoints ());
@@ -6195,6 +6196,7 @@ private function processAssignVar(
61956196 )->getThrowPoints ());
61966197 }
61976198 } elseif ($ var instanceof PropertyFetch) {
6199+ $ this ->storeBeforeScope ($ storage , $ var , $ scope );
61986200 $ objectResult = $ this ->processExprNode ($ stmt , $ var ->var , $ scope , $ storage , $ nodeCallback , $ context );
61996201 $ hasYield = $ objectResult ->hasYield ();
62006202 $ throwPoints = $ objectResult ->getThrowPoints ();
@@ -6292,6 +6294,7 @@ private function processAssignVar(
62926294 }
62936295
62946296 } elseif ($ var instanceof Expr \StaticPropertyFetch) {
6297+ $ this ->storeBeforeScope ($ storage , $ var , $ scope );
62956298 if ($ var ->class instanceof Node \Name) {
62966299 $ propertyHolderType = $ scope ->resolveTypeByName ($ var ->class );
62976300 } else {
@@ -6357,6 +6360,7 @@ private function processAssignVar(
63576360 $ scope = $ scope ->assignExpression ($ var , $ assignedExprType , $ scope ->getNativeType ($ assignedExpr ));
63586361 }
63596362 } elseif ($ var instanceof List_) {
6363+ $ this ->storeBeforeScope ($ storage , $ var , $ scope );
63606364 $ result = $ processExprCallback ($ scope );
63616365 $ hasYield = $ result ->hasYield ();
63626366 $ throwPoints = array_merge ($ throwPoints , $ result ->getThrowPoints ());
@@ -6473,6 +6477,7 @@ private function processAssignVar(
64736477 );
64746478 }
64756479 } else {
6480+ $ this ->storeBeforeScope ($ storage , $ var , $ scope );
64766481 $ result = $ processExprCallback ($ scope );
64776482 $ hasYield = $ result ->hasYield ();
64786483 $ throwPoints = $ result ->getThrowPoints ();
0 commit comments