aeneas icon indicating copy to clipboard operation
aeneas copied to clipboard

'... and assignment' operators cause an error on arrays.

Open simonjwinwood opened this issue 1 year ago • 0 comments
trafficstars

Hi, the following causes Aeneas to fail

fn doit(x : &mut [usize]) {
    x[0] += 1;
}

with error

[Error] Can not apply a projection to the ⊥ value

This only seems to happen with arrays/slices (i.e., not e.g. usizes), and happens with other similar '... and assignment' operators. This also happens with

fn doit(x : &mut [usize; 1]) {
    x[0] += 1;
}

simonjwinwood avatar Aug 12 '24 01:08 simonjwinwood