Skip to content

Commit

Permalink
Fix #4005 - prevent crash when assignment var assertion no longer valid
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Aug 17, 2020
1 parent 12798d1 commit de6b354
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Loop/ForTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ function test(Node $head) {
}
}'
],
'noException' => [
'<?php
/**
* @param list<int> $arr
*/
function cartesianProduct(array $arr) : void {
for ($i = 20; $arr[$i] === 5 && $i > 0; $i--) {}
}'
],
];
}

Expand Down

0 comments on commit de6b354

Please sign in to comment.