Skip to content

feat: invalid index/range and length of sequence are provided for out of bounds error messsage to end user.

Purpose

Before the error message of out of bounds did only show that that index caused out of bounds. I as end user would however like to know which index is not valid on which length of an array.

Changes

I changed the error OutOfBounds Variant on the enum ...::expansion::Error by 2 fields with length and index. These 2 fields are incorporated into the error message. I also introduced a new error variant called InvalidRange for cases like @array[5..12] with array = [2 4] where start index is too big for the array.

About CI

The job linux:stable of the CI of Ion fails with compiling error.

See this issue for more details.

Merge request reports