diff options
| author | 2026-10-15 02:35:04 +0330 | |
|---|---|---|
| committer | 2026-10-15 02:40:51 +0330 | |
| commit | 31ae48845492c12f2745c7f4c0cd2ea448e0942a (patch) | |
| tree | bcd26f483f4774fbcbae9c621050b10b3b53f295 /tests/test.sh | |
| parent | genmap: default genome reservation 0x70000 words (the genome had 197 words le... (diff) | |
destructors: reassigning an m owner that still holds a value frees the old value first, running its drop (right side first, then the free, then the store), with hint: x: reassigning frees the old value; a new value that is part of the old one is an error; u, d and captured owners keep the leak error; the new value's size, leaf type and drop are recorded like a declaration's; spec 6.8.5, 6.15.2
Diffstat (limited to 'tests/test.sh')
| -rwxr-xr-x | tests/test.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test.sh b/tests/test.sh index e93472c..9aee6d0 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -579,6 +579,7 @@ s_lsp() { done chk "$($lsp < examples/struct_closure_opt.zc | grep -c error)" "0" "lsp: methods and closures check clean" case "$($lsp < tests/data/drop_hint.zc)" in *"value with drop is never bound; it drops at the end of this statement"*) chk 1 1 "lsp hint: a value with drop that is never bound";; *) chk 0 1 "lsp hint: a value with drop that is never bound";; esac + case "$($lsp < tests/data/reassign_hint.zc)" in *"p: reassigning frees the old value"*) chk 1 1 "lsp hint: reassigning an owner frees the old value";; *) chk 0 1 "lsp hint: reassigning an owner frees the old value";; esac # a file of a larger build checks on its own: its bodyless declarations are not errors in check mode for f in src/runtime/rt.zc src/runtime/run.zc src/lsp/server.zc; do chk "$($lsp < $f | grep -c ': error:')" "0" "lsp: $f checks alone"; done # the compiler is several files that only make sense together: check them as one document |
