Skip to main content

Invalid Range Order

Erroneous Code Example

This error occurs when the start value of a range is greater than or equal to the end value. This error is only emitted by the compiler when both start and end values are provided as literals. A runtime error will be emitted if the range is not valid at runtime. In this example, the start value is greater than the end value.

Solution

Ensure range start value is less than end value.