You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 13, 2023. It is now read-only.
Wrong behavior
Try to iterate over a range of bytes with a for-loop:
for (bin0.byte..3.byte) {
print(b);
}
Try it!
Trying to run this on try.ceylon-lang.org gives this error:
undefined — Runtime error:
undefined — --- TypeError: $1i.compare is not a function
Script ended with no output
Expected behavior
Running this code should print
0
1
2
3
Analysis
From the error message, it looks like some part of the compiler is trying to convert this into a classic increment-comparison loop. But bytes in Ceylon have no total ordering, and thus also no comparison operators or compare functions.