@@ -4228,7 +4228,7 @@ private function processClosureNode(
42284228 }
42294229
42304230 $ closureScope = $ scope ->enterAnonymousFunction ($ expr , $ callableParameters );
4231- $ closureScope = $ closureScope ->processClosureScope ($ scope , null , $ byRefUses );
4231+ $ closureScope = $ closureScope ->processClosureScope ($ expr , $ scope , null , $ byRefUses );
42324232 $ closureType = $ closureScope ->getAnonymousFunctionReflection ();
42334233 if (!$ closureType instanceof ClosureType) {
42344234 throw new ShouldNotHappenException ();
@@ -4298,7 +4298,7 @@ private function processClosureNode(
42984298 $ intermediaryClosureScope = $ intermediaryClosureScope ->mergeWith ($ exitPoint ->getScope ());
42994299 }
43004300 $ closureScope = $ scope ->enterAnonymousFunction ($ expr , $ callableParameters );
4301- $ closureScope = $ closureScope ->processClosureScope ($ intermediaryClosureScope , $ prevScope , $ byRefUses );
4301+ $ closureScope = $ closureScope ->processClosureScope ($ expr , $ intermediaryClosureScope , $ prevScope , $ byRefUses );
43024302 if ($ closureScope ->equals ($ prevScope )) {
43034303 break ;
43044304 }
@@ -4318,7 +4318,7 @@ private function processClosureNode(
43184318 array_merge ($ statementResult ->getImpurePoints (), $ closureImpurePoints ),
43194319 ), $ closureScope );
43204320
4321- return new ProcessClosureResult ($ scope ->processClosureScope ($ closureScope , null , $ byRefUses ), $ statementResult ->getThrowPoints (), $ statementResult ->getImpurePoints (), $ invalidateExpressions );
4321+ return new ProcessClosureResult ($ scope ->processClosureScope ($ expr , $ closureScope , null , $ byRefUses ), $ statementResult ->getThrowPoints (), $ statementResult ->getImpurePoints (), $ invalidateExpressions );
43224322 }
43234323
43244324 /**
0 commit comments