JuliaServices / Match.jl

Advanced Pattern Matching for Julia
https://juliaservices.github.io/Match.jl/latest/
Other
240 stars 22 forks source link

Don't assume 1-based indexing. #81

Open gafter opened 1 year ago

gafter commented 1 year ago

From https://github.com/gafter/Rematch2.jl/pull/4#issuecomment-1523123644

When dealing with arrays, the generated code assumes one-based indexing which is fine for most cases, but to support packages like OffsetArrays, we should switch to firstindex(a) / lastindex(a) instead of 1 and length(a) etc.