array iterator does not track a growing array #124

Siddhant opened this Issue May 21, 2012 · 1 comment


None yet
2 participants

The following loop should iterate infinitely, but it does not:

my @array = 1, 2;

for @array -> $n {
    @array.push: $n + 2;

say @rray;

niecza version (last commit in my clone of niecza): fb775fb

bug discovered:


sorear commented May 25, 2012

Following patch works, but I'm not applying it because it makes for loops over arrays ~90 times slower. I will revisit this when I find a better approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment