Actually; I fixed this but my fix was completely wrong. The output seems fine?
import System.Collections.Generic
import System.Linq
import System.Text
import System.Threading.Tasks
print("The magic happens here.")
for i in (0..<3) {
writeLn(i);
}
for i in (0...2) {
writeLn(i);
}
print("")
~> Process ConsoleApplication221 started.
The magic happens here.
loop a: 0
loop a: 1
loop a: 2
loop a: 3
loop b: 0
loop b: 1
~> Process ConsoleApplication221 terminated with exit code 0
for
import System.Collections.Generic
import System.Linq
import System.Text
print("The magic happens here.")
for i in (0..<3) {
writeLn("loop a: "+i);
}
for i in (0...2) {
writeLn("loop b: "+i);
}
Turns out the problem was with the Range type. for I in 0...2 would use an optimized for/to loop, and work, for I in (0...2) with parenthesis used the Range type, which was broken. Fixed for today’s upcoming beta in SBL. Workaround is to nit use parenthesis, or to grab latest SBL form GitHub.