// Intentionally rejected examples; each function illustrates a separate rule.
// Check: build/flecha --emit-llvm examples/diagnostics/fixed_arrays.fl
[3]u8 values = [1, 2]; // FLECHA-S0035
[2]string values = none; // FLECHA-S0034: owning elements are not supported yet.
return values[2]; // FLECHA-S0036
void incomplete_initialization() {
values[0] = 1; // FLECHA-S0021: whole-array initialization is required first.
const [2]u8 values = [1, 2];
values[0] = 3; // FLECHA-S0005
u8 overlapping_borrows() {
values[1] = 3; // FLECHA-S0029: the first borrow protects the whole array.
[18446744073709551615]u64 values = none; // FLECHA-S0033