Closed TomAFrench closed 22 hours ago
~@michaeljklein potentially related to your recent changes?~ Looks like we just weren't canonicalizing array lengths at all.
Hmm, it's possible the new CheckedCast variant is messing with recursive matches when we try to check for Infix(Infix(N, -, 1), +, 1)
since it now could be Infix(CheckedCast(Infix(N, -, 1)), +, 1)
or another variant with CheckedCast wrapping the constants as well.
On the latest sync we've started getting errors of the form
In https://github.com/noir-lang/noir/pull/6494 I've added a unit test showing how we fail to canonicalize the length of these arrays.
We should update the canonicalization logic such that the
solves_n_plus_one_minus_one_array_length
test passes.