@@ -1518,7 +1518,7 @@ public function withRecordedStatementDelta(self $recordedEntry, self $recordedEx
15181518 $ conditionalExpressions ,
15191519 [],
15201520 [],
1521- [] ,
1521+ $ this -> inFunctionCallsStack ,
15221522 $ this ->inFirstLevelStatement ,
15231523 $ recordedExit ->afterExtractCall ,
15241524 );
@@ -2334,6 +2334,7 @@ public function enterClosureBind(?Type $thisType, ?Type $nativeThisType, array $
23342334 $ this ->conditionalExpressions ,
23352335 $ scopeClasses ,
23362336 $ this ->anonymousFunctionReflection ,
2337+ inFunctionCallsStack: $ this ->inFunctionCallsStack ,
23372338 templateArgumentFrame: $ this ->templateArgumentFrame ,
23382339 templateArgumentConstraints: $ this ->templateArgumentConstraints ,
23392340 );
@@ -2365,6 +2366,7 @@ public function restoreOriginalScopeAfterClosureBind(self $originalScope): self
23652366 $ this ->conditionalExpressions ,
23662367 $ originalScope ->inClosureBindScopeClasses ,
23672368 $ this ->anonymousFunctionReflection ,
2369+ inFunctionCallsStack: $ this ->inFunctionCallsStack ,
23682370 templateArgumentFrame: $ this ->templateArgumentFrame ,
23692371 templateArgumentConstraints: $ this ->templateArgumentConstraints ,
23702372 );
@@ -2436,6 +2438,7 @@ public function enterClosureCall(Type $thisType, Type $nativeThisType): self
24362438 $ this ->conditionalExpressions ,
24372439 $ thisType ->getObjectClassNames (),
24382440 $ this ->anonymousFunctionReflection ,
2441+ inFunctionCallsStack: $ this ->inFunctionCallsStack ,
24392442 templateArgumentFrame: $ this ->templateArgumentFrame ,
24402443 templateArgumentConstraints: $ this ->templateArgumentConstraints ,
24412444 );
@@ -3044,7 +3047,7 @@ public function enterExpressionAssign(Expr $expr, bool $isPlainWrite = true): se
30443047 $ this ->isInFirstLevelStatement (),
30453048 $ currentlyAssignedExpressions ,
30463049 $ this ->currentlyAllowedUndefinedExpressions ,
3047- [] ,
3050+ $ this -> inFunctionCallsStack ,
30483051 $ this ->afterExtractCall ,
30493052 $ this ->parentScope ,
30503053 $ this ->nativeTypesPromoted ,
@@ -3075,7 +3078,7 @@ public function exitExpressionAssign(Expr $expr): self
30753078 $ this ->isInFirstLevelStatement (),
30763079 $ currentlyAssignedExpressions ,
30773080 $ this ->currentlyAllowedUndefinedExpressions ,
3078- [] ,
3081+ $ this -> inFunctionCallsStack ,
30793082 $ this ->afterExtractCall ,
30803083 $ this ->parentScope ,
30813084 $ this ->nativeTypesPromoted ,
@@ -3136,7 +3139,7 @@ public function setAllowedUndefinedExpression(Expr $expr): self
31363139 $ this ->isInFirstLevelStatement (),
31373140 $ this ->currentlyAssignedExpressions ,
31383141 $ currentlyAllowedUndefinedExpressions ,
3139- [] ,
3142+ $ this -> inFunctionCallsStack ,
31403143 $ this ->afterExtractCall ,
31413144 $ this ->parentScope ,
31423145 $ this ->nativeTypesPromoted ,
@@ -3167,7 +3170,7 @@ public function unsetAllowedUndefinedExpression(Expr $expr): self
31673170 $ this ->isInFirstLevelStatement (),
31683171 $ this ->currentlyAssignedExpressions ,
31693172 $ currentlyAllowedUndefinedExpressions ,
3170- [] ,
3173+ $ this -> inFunctionCallsStack ,
31713174 $ this ->afterExtractCall ,
31723175 $ this ->parentScope ,
31733176 $ this ->nativeTypesPromoted ,
@@ -4454,7 +4457,7 @@ private function mergeWithVariableState(?self $otherScope, bool $preserveVacuous
44544457 $ conditionalExpressions ,
44554458 [],
44564459 [],
4457- [] ,
4460+ $ this -> inFunctionCallsStack ,
44584461 $ this ->inFirstLevelStatement ,
44594462 $ this ->afterExtractCall && $ otherScope ->afterExtractCall ,
44604463 );
@@ -4733,7 +4736,7 @@ public function processFinallyScope(self $finallyScope, self $originalFinallySco
47334736 $ this ->inFirstLevelStatement ,
47344737 [],
47354738 [],
4736- [] ,
4739+ $ this -> inFunctionCallsStack ,
47374740 $ this ->afterExtractCall ,
47384741 $ this ->parentScope ,
47394742 $ this ->nativeTypesPromoted ,
@@ -4882,7 +4885,7 @@ public function processAlwaysIterableForeachScopeWithoutPollute(self $finalScope
48824885 $ this ->inFirstLevelStatement ,
48834886 [],
48844887 [],
4885- [] ,
4888+ $ this -> inFunctionCallsStack ,
48864889 $ this ->afterExtractCall ,
48874890 $ this ->parentScope ,
48884891 $ this ->nativeTypesPromoted ,
@@ -4947,7 +4950,7 @@ private function generalizeWithVariableState(self $otherScope, ?array $writableV
49474950 $ this ->inFirstLevelStatement ,
49484951 [],
49494952 [],
4950- [] ,
4953+ $ this -> inFunctionCallsStack ,
49514954 $ this ->afterExtractCall ,
49524955 $ this ->parentScope ,
49534956 $ this ->nativeTypesPromoted ,
0 commit comments