diff options
| -rw-r--r-- | examples/vec.fwd | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/vec.fwd b/examples/vec.fwd index bd88091..903c3e7 100644 --- a/examples/vec.fwd +++ b/examples/vec.fwd @@ -124,6 +124,10 @@ check_vec(i64 i, i64 n, vec v, (vec) ok) if i < n { at_vec(v, i as u64) => v, elem; + /* oh, this doesn't really work with the memory analysis, since + * I can destroy `v` but `elem` is still usable. I guess I could + * transform this such that `elem` is only alive within a + * closure? Not sure. */ guard(elem* == i) => { destroy_vec(v); fwdpanic("check_vec, vec built wrong\n"); |
