Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make all cases of statementlist
loop
eval to Nil
Previously, `loop { }` and `loop (; $++ < 3;) { }` would evaluate to Nil, but `loop (my $i = 0; $i < 3; $i++) { }` would evaluate to an `nqp::null` due to the oversight that is corrected in this commit. This bug was made more visible when recent changes to return handling removed the `nqp::null` mapping into Mu, resulting in the problem observed in issue #2069. Since all other loop cases evaluated to Nil, this created a discontinuity where one particular case of `loop` would instead evaluate to Mu. Therefore, there was already a bug; the recent changes just made it problematic in more cases.
- Loading branch information