diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-02-26 01:30:36 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2026-02-26 01:30:36 +0200 |
| commit | c134c59004175375e74b19216040078c6cbeb3c1 (patch) | |
| tree | 8e3a2525098235befa854eb020e47f9b81c5337e /examples | |
| parent | e36f35d0ee1132a8aa998891ca333ff0c4ed64c2 (diff) | |
| download | fwd-c134c59004175375e74b19216040078c6cbeb3c1.tar.gz fwd-c134c59004175375e74b19216040078c6cbeb3c1.zip | |
add comment about hole in my assumptions
Diffstat (limited to 'examples')
| -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"); |
