This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Description
Wrong behavior
Try to iterate over a range of bytes with a for-loop:
for (b in 0.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
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.