; Checked borrow.index past the end traps. ; expect: run ; trap: T0008 ; phase: 1 ; spec: docs/spec/07a-air-instructions.md module test.index_out_of_bounds air 0 lang 0.1 features [arrays, ownership] fn @main() -> u8 effects [] entry: %x = local.alloc array local.zero %x %r = borrow.ref %x %k = const.usize 4 %e = borrow.index %r, %k %v = load %e borrow.end %e borrow.end %r ret %v