Skip to content

v1.11.1

Compare
Choose a tag to compare
@odino odino released this 24 Feb 19:20
· 168 commits to master since this release

This is a bugfix release that fixes a regression introduced in 1.10.1: early returns from within for and for in loops were enabled for all return values, not just explicit ones.

An explicit return is defined as using the return keyword:

for x in 1..10 {
  return x
}

but the early return feature was enabled also for implicit returns:

for x in 1..10 {
  x <-- this loop only runs one, and return the first value of x
}

which would make code such as this fail:

list = []
for x in 1..10 {
  list.push(x) <-- this will be considered an implicit return, and only run once
}

This was fixed with #325.

Please note that the 1.10.x branch will not see a backport of this fix.