@@ -4232,7 +4232,7 @@ private function processClosureNode(
42324232 }
42334233
42344234 $ closureScope = $ scope ->enterAnonymousFunction ($ expr , $ callableParameters );
4235- $ closureScope = $ closureScope ->processClosureScope ($ scope , null , $ byRefUses );
4235+ $ closureScope = $ closureScope ->processClosureScope ($ expr , $ scope , null , $ byRefUses );
42364236 $ closureType = $ closureScope ->getAnonymousFunctionReflection ();
42374237 if (!$ closureType instanceof ClosureType) {
42384238 throw new ShouldNotHappenException ();
@@ -4302,7 +4302,7 @@ private function processClosureNode(
43024302 $ intermediaryClosureScope = $ intermediaryClosureScope ->mergeWith ($ exitPoint ->getScope ());
43034303 }
43044304 $ closureScope = $ scope ->enterAnonymousFunction ($ expr , $ callableParameters );
4305- $ closureScope = $ closureScope ->processClosureScope ($ intermediaryClosureScope , $ prevScope , $ byRefUses );
4305+ $ closureScope = $ closureScope ->processClosureScope ($ expr , $ intermediaryClosureScope , $ prevScope , $ byRefUses );
43064306 if ($ closureScope ->equals ($ prevScope )) {
43074307 break ;
43084308 }
@@ -4322,7 +4322,7 @@ private function processClosureNode(
43224322 array_merge ($ statementResult ->getImpurePoints (), $ closureImpurePoints ),
43234323 ), $ closureScope );
43244324
4325- return new ProcessClosureResult ($ scope ->processClosureScope ($ closureScope , null , $ byRefUses ), $ statementResult ->getThrowPoints (), $ statementResult ->getImpurePoints (), $ invalidateExpressions );
4325+ return new ProcessClosureResult ($ scope ->processClosureScope ($ expr , $ closureScope , null , $ byRefUses ), $ statementResult ->getThrowPoints (), $ statementResult ->getImpurePoints (), $ invalidateExpressions );
43264326 }
43274327
43284328 /**
0 commit comments