@@ -4232,7 +4232,7 @@ private function processClosureNode(
4232
4232
}
4233
4233
4234
4234
$ closureScope = $ scope ->enterAnonymousFunction ($ expr , $ callableParameters );
4235
- $ closureScope = $ closureScope ->processClosureScope ($ scope , null , $ byRefUses );
4235
+ $ closureScope = $ closureScope ->processClosureScope ($ expr , $ scope , null , $ byRefUses );
4236
4236
$ closureType = $ closureScope ->getAnonymousFunctionReflection ();
4237
4237
if (!$ closureType instanceof ClosureType) {
4238
4238
throw new ShouldNotHappenException ();
@@ -4302,7 +4302,7 @@ private function processClosureNode(
4302
4302
$ intermediaryClosureScope = $ intermediaryClosureScope ->mergeWith ($ exitPoint ->getScope ());
4303
4303
}
4304
4304
$ closureScope = $ scope ->enterAnonymousFunction ($ expr , $ callableParameters );
4305
- $ closureScope = $ closureScope ->processClosureScope ($ intermediaryClosureScope , $ prevScope , $ byRefUses );
4305
+ $ closureScope = $ closureScope ->processClosureScope ($ expr , $ intermediaryClosureScope , $ prevScope , $ byRefUses );
4306
4306
if ($ closureScope ->equals ($ prevScope )) {
4307
4307
break ;
4308
4308
}
@@ -4322,7 +4322,7 @@ private function processClosureNode(
4322
4322
array_merge ($ statementResult ->getImpurePoints (), $ closureImpurePoints ),
4323
4323
), $ closureScope );
4324
4324
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 );
4326
4326
}
4327
4327
4328
4328
/**
0 commit comments