File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 1010use PhpParser \Node \ComplexType ;
1111use PhpParser \Node \Expr ;
1212use PhpParser \Node \Expr \Array_ ;
13+ use PhpParser \Node \Expr \ArrayDimFetch ;
1314use PhpParser \Node \Expr \BinaryOp ;
1415use PhpParser \Node \Expr \Cast \Unset_ ;
1516use PhpParser \Node \Expr \ConstFetch ;
@@ -4418,6 +4419,11 @@ private function preserveResolvedTypes(array $changedExpressions): array
44184419 $ exprExpr = $ exprTypeHolder ->getExpr ();
44194420
44204421 foreach ($ changedExpressions as $ exprStringToInvalidate => $ expressionToInvalidate ) {
4422+ while ($ expressionToInvalidate instanceof Expr \ArrayDimFetch) {
4423+ $ expressionToInvalidate = $ expressionToInvalidate ->var ;
4424+ $ exprStringToInvalidate = $ this ->getNodeKey ($ expressionToInvalidate );
4425+ }
4426+
44214427 if (!$ this ->shouldInvalidateExpression ($ exprStringToInvalidate , $ expressionToInvalidate , $ exprExpr )) {
44224428 continue ;
44234429 }
You can’t perform that action at this time.
0 commit comments