| 1 | conform/err/FrameSlice.raz:14:12: error: can't return a slice of the procedure's own frame |
| 2 | 14 | return h[0..8]; (* the procedure's copy *) |
| 3 | | ^^^^^^^ |
| 4 | help: it is gone once the procedure returns: take the array as a var parameter, or fill a buffer the caller gives |
| 5 | conform/err/FrameSlice.raz:20:12: error: can't return a slice of the procedure's own frame |
| 6 | 20 | return a; (* the array, silently a slice *) |
| 7 | | ^ |
| 8 | help: it is gone once the procedure returns: take the array as a var parameter, or fill a buffer the caller gives |
| 9 | conform/err/FrameSlice.raz:26:12: error: can't return a slice of the procedure's own frame |
| 10 | 26 | return p.a[0..n], n; (* one of several results *) |
| 11 | | ^^^^^^^^^ |
| 12 | help: it is gone once the procedure returns: take the array as a var parameter, or fill a buffer the caller gives |
| 13 | conform/err/FrameSlice.raz:31:12: error: can't return a slice of the procedure's own frame |
| 14 | 31 | return [1, 2, 3]; (* a hidden variable of the call *) |
| 15 | | ^^^^^^^^^ |
| 16 | help: it is gone once the procedure returns: take the array as a var parameter, or fill a buffer the caller gives |
| 17 | conform/err/FrameSlice.raz:42:12: error: can't return a slice of the procedure's own frame |
| 18 | 42 | return whole()[0..2]; (* the array whole returns, a temporary *) |
| 19 | | ^^^^^^^^^^^^^ |
| 20 | help: it is gone once the procedure returns: take the array as a var parameter, or fill a buffer the caller gives |
| 21 | raz: 5 errors |