raz / test / msg / BytesFrame.err

25 lines · 1.8 KiB · raw · history · last change 8e0ec9ce

1conform/err/BytesFrame.raz:14:12: error: can't return a slice of the procedure's own frame
2 14 | return BYTES(h); (* the procedure's own variable *)
3 | ^^^^^^^^
4help: it is gone once the procedure returns: take the array as a var parameter, or fill a buffer the caller gives
5conform/err/BytesFrame.raz:20:12: error: can't return a slice of the procedure's own frame
6 20 | return BYTES(h.count); (* a field of one *)
7 | ^^^^^^^^^^^^^^
8help: it is gone once the procedure returns: take the array as a var parameter, or fill a buffer the caller gives
9conform/err/BytesFrame.raz:26:12: error: can't return a slice of the procedure's own frame
10 26 | return BYTES(a[i]), i; (* an element of one, one of several results *)
11 | ^^^^^^^^^^^
12help: it is gone once the procedure returns: take the array as a var parameter, or fill a buffer the caller gives
13conform/err/BytesFrame.raz:31:12: error: can't return a slice of the procedure's own frame
14 31 | return BYTES(h); (* the procedure's copy *)
15 | ^^^^^^^^
16help: it is gone once the procedure returns: take the array as a var parameter, or fill a buffer the caller gives
17conform/err/BytesFrame.raz:38:12: error: can't return a slice of the procedure's own frame
18 38 | return BYTES(n); (* a local that may live in a register *)
19 | ^^^^^^^^
20help: it is gone once the procedure returns: take the array as a var parameter, or fill a buffer the caller gives
21conform/err/BytesFrame.raz:44:12: error: can't return a slice of the procedure's own frame
22 44 | return BYTES(a[1..3]); (* a slice of a local array *)
23 | ^^^^^^^^^^^^^^
24help: it is gone once the procedure returns: take the array as a var parameter, or fill a buffer the caller gives
25raz: 6 errors