@@ -4546,12 +4546,11 @@ private function inferForLoopExpressions(For_ $stmt, Expr $lastCondExpr, Mutatin
45464546 ) {
45474547 $ arrayArg = $ lastCondExpr ->right ->getArgs ()[0 ]->value ;
45484548 $ arrayType = $ bodyScope ->getType ($ arrayArg );
4549- $ arrayNativeType = $ bodyScope ->getNativeType ($ arrayArg );
4550- if ($ arrayType ->isList ()->yes () || $ arrayNativeType ->isList ()->yes ()) {
4549+ if ($ arrayType ->isList ()->yes ()) {
45514550 $ bodyScope = $ bodyScope ->assignExpression (
45524551 new ArrayDimFetch ($ lastCondExpr ->right ->getArgs ()[0 ]->value , $ lastCondExpr ->left ),
45534552 $ arrayType ->getIterableValueType (),
4554- $ arrayNativeType ->getIterableValueType (),
4553+ $ bodyScope -> getNativeType ( $ arrayArg ) ->getIterableValueType (),
45554554 );
45564555 }
45574556 }
@@ -4571,12 +4570,11 @@ private function inferForLoopExpressions(For_ $stmt, Expr $lastCondExpr, Mutatin
45714570 ) {
45724571 $ arrayArg = $ lastCondExpr ->left ->getArgs ()[0 ]->value ;
45734572 $ arrayType = $ bodyScope ->getType ($ arrayArg );
4574- $ arrayNativeType = $ bodyScope ->getNativeType ($ arrayArg );
4575- if ($ arrayType ->isList ()->yes () || $ arrayNativeType ->isList ()->yes ()) {
4573+ if ($ arrayType ->isList ()->yes ()) {
45764574 $ bodyScope = $ bodyScope ->assignExpression (
45774575 new ArrayDimFetch ($ lastCondExpr ->left ->getArgs ()[0 ]->value , $ lastCondExpr ->right ),
45784576 $ arrayType ->getIterableValueType (),
4579- $ arrayNativeType ->getIterableValueType (),
4577+ $ bodyScope -> getNativeType ( $ arrayArg ) ->getIterableValueType (),
45804578 );
45814579 }
45824580 }
0 commit comments