diff options
| author | 2026-10-14 09:09:21 +0330 | |
|---|---|---|
| committer | 2026-10-14 09:09:21 +0330 | |
| commit | dc7f7407e08f54e4a2a3c1d1723b2a7d6959532d (patch) | |
| tree | d1de9f471a99951c57896f85b5e5523eeb96cee1 /docs/history/10-zc/code/tests/errors | |
| parent | todo: sync docs, examples and fixtures with the include format, and test acto... (diff) | |
docs: archive the frozen stage code as one compressed tarball
docs/history kept six stages with a full copy of the project under code/,
3.8 mb of sources duplicated from stage to stage and already superseded. store
them as docs/history/code-snapshots.tar.gz, 0.66 mb, and extract one in place
to read it. every stage's notes.md stays browsable, and the index says where the
code went and how to get it back.
the top-level README points at the archive too. its other two links into
docs/history, 21-micro and 35-bench, were notes that were never kept and do not
resolve; the index now records that.
Diffstat (limited to 'docs/history/10-zc/code/tests/errors')
24 files changed, 0 insertions, 62 deletions
diff --git a/docs/history/10-zc/code/tests/errors/back_to_m.zc b/docs/history/10-zc/code/tests/errors/back_to_m.zc deleted file mode 100644 index ee25096..0000000 --- a/docs/history/10-zc/code/tests/errors/back_to_m.zc +++ /dev/null @@ -1,2 +0,0 @@ -// expect: x: can't be recast back to m -fn main() { var x = new(3); x as d; x as m; return 0; } diff --git a/docs/history/10-zc/code/tests/errors/borrow_escape.zc b/docs/history/10-zc/code/tests/errors/borrow_escape.zc deleted file mode 100644 index 725bc61..0000000 --- a/docs/history/10-zc/code/tests/errors/borrow_escape.zc +++ /dev/null @@ -1,3 +0,0 @@ -// expect: p: is owned and can't be returned -fn f(m p) { return p; } -fn main() { var x = new(1); f(x); return 0; } diff --git a/docs/history/10-zc/code/tests/errors/branch_mismatch.zc b/docs/history/10-zc/code/tests/errors/branch_mismatch.zc deleted file mode 100644 index 62cb18b..0000000 --- a/docs/history/10-zc/code/tests/errors/branch_mismatch.zc +++ /dev/null @@ -1,3 +0,0 @@ -// expect: x: ends the branches of an if in different states -fn take(d p) { return p[0]; } -fn main() { var x = new(1); x as d; if (x[0]) take(x); return 0; } diff --git a/docs/history/10-zc/code/tests/errors/child_dies.zc b/docs/history/10-zc/code/tests/errors/child_dies.zc deleted file mode 100644 index 16e1935..0000000 --- a/docs/history/10-zc/code/tests/errors/child_dies.zc +++ /dev/null @@ -1,3 +0,0 @@ -// expect: c: used after it was given away -fn take(d p) { return p[0]; } -fn main() { var p = new(2), c = new(1); p[0] = c; take(p as d); return c[0]; } diff --git a/docs/history/10-zc/code/tests/errors/child_recast.zc b/docs/history/10-zc/code/tests/errors/child_recast.zc deleted file mode 100644 index f4be23e..0000000 --- a/docs/history/10-zc/code/tests/errors/child_recast.zc +++ /dev/null @@ -1,2 +0,0 @@ -// expect: c: belongs to a container; recast the container instead -fn main() { var p = new(2), c = new(1); p[0] = c; c as d; return 0; } diff --git a/docs/history/10-zc/code/tests/errors/copy_owned.zc b/docs/history/10-zc/code/tests/errors/copy_owned.zc deleted file mode 100644 index 42d2ab0..0000000 --- a/docs/history/10-zc/code/tests/errors/copy_owned.zc +++ /dev/null @@ -1,2 +0,0 @@ -// expect: x: is an owned object and can't be copied -fn main() { var x = new(1); var y = x; return y[0]; } diff --git a/docs/history/10-zc/code/tests/errors/d_into_block.zc b/docs/history/10-zc/code/tests/errors/d_into_block.zc deleted file mode 100644 index 02189ab..0000000 --- a/docs/history/10-zc/code/tests/errors/d_into_block.zc +++ /dev/null @@ -1,2 +0,0 @@ -// expect: x: used after it was given away -fn main() { var x = new(1); x as d; { x[0] = 5; } return x[0]; } diff --git a/docs/history/10-zc/code/tests/errors/d_kept.zc b/docs/history/10-zc/code/tests/errors/d_kept.zc deleted file mode 100644 index 28eaccf..0000000 --- a/docs/history/10-zc/code/tests/errors/d_kept.zc +++ /dev/null @@ -1,2 +0,0 @@ -// expect: x: d object was never given away -fn main() { var x = new(3); x as d; x[0] = 1; return 0; } diff --git a/docs/history/10-zc/code/tests/errors/discard_u.zc b/docs/history/10-zc/code/tests/errors/discard_u.zc deleted file mode 100644 index 18bc810..0000000 --- a/docs/history/10-zc/code/tests/errors/discard_u.zc +++ /dev/null @@ -1,3 +0,0 @@ -// expect: can't be thrown away -fn mk() -> u { var p = new(1); return p as u; } -fn main() { mk(); return 0; } diff --git a/docs/history/10-zc/code/tests/errors/give_m.zc b/docs/history/10-zc/code/tests/errors/give_m.zc deleted file mode 100644 index 537fa0c..0000000 --- a/docs/history/10-zc/code/tests/errors/give_m.zc +++ /dev/null @@ -1,3 +0,0 @@ -// expect: x: is m; write 'as d' -fn take(d p) { return p[0]; } -fn main() { var x = new(3); take(x); return 0; } diff --git a/docs/history/10-zc/code/tests/errors/global_store.zc b/docs/history/10-zc/code/tests/errors/global_store.zc deleted file mode 100644 index 13882b9..0000000 --- a/docs/history/10-zc/code/tests/errors/global_store.zc +++ /dev/null @@ -1,3 +0,0 @@ -// expect: x: must be d to be stored in a global -var g; -fn main() { var x = new(1); g = x; return 0; } diff --git a/docs/history/10-zc/code/tests/errors/leak_overwrite.zc b/docs/history/10-zc/code/tests/errors/leak_overwrite.zc deleted file mode 100644 index 42773fb..0000000 --- a/docs/history/10-zc/code/tests/errors/leak_overwrite.zc +++ /dev/null @@ -1,2 +0,0 @@ -// expect: x: still owns an object -fn main() { var x = new(1); x = new(2); return x[0]; } diff --git a/docs/history/10-zc/code/tests/errors/lend_d.zc b/docs/history/10-zc/code/tests/errors/lend_d.zc deleted file mode 100644 index e1e37d5..0000000 --- a/docs/history/10-zc/code/tests/errors/lend_d.zc +++ /dev/null @@ -1,4 +0,0 @@ -// expect: x: is d; pass it to a d parameter -fn look(m p) { return p[0]; } -fn take(d p) { return p[0]; } -fn main() { var x = new(3); x as d; look(x); take(x); return 0; } diff --git a/docs/history/10-zc/code/tests/errors/loop_move.zc b/docs/history/10-zc/code/tests/errors/loop_move.zc deleted file mode 100644 index b1a6019..0000000 --- a/docs/history/10-zc/code/tests/errors/loop_move.zc +++ /dev/null @@ -1,3 +0,0 @@ -// expect: x: changes state inside a loop -fn take(d p) { return p[0]; } -fn main() { var x = new(1); var i = 0; x as d; while (i < 3) { take(x); i++; } return 0; } diff --git a/docs/history/10-zc/code/tests/errors/plain_return.zc b/docs/history/10-zc/code/tests/errors/plain_return.zc deleted file mode 100644 index 61f546f..0000000 --- a/docs/history/10-zc/code/tests/errors/plain_return.zc +++ /dev/null @@ -1,3 +0,0 @@ -// expect: returns a new object; declare the function with -> u -fn mk() { return new(1); } -fn main() { return mk(); } diff --git a/docs/history/10-zc/code/tests/errors/proto_needed.zc b/docs/history/10-zc/code/tests/errors/proto_needed.zc deleted file mode 100644 index 2613b9d..0000000 --- a/docs/history/10-zc/code/tests/errors/proto_needed.zc +++ /dev/null @@ -1,3 +0,0 @@ -// expect: f: was called before its tags were declared -fn main() { var x = new(1); f(1); return x[0]; } -fn f(d p) { return 0; } diff --git a/docs/history/10-zc/code/tests/errors/return_m.zc b/docs/history/10-zc/code/tests/errors/return_m.zc deleted file mode 100644 index c361760..0000000 --- a/docs/history/10-zc/code/tests/errors/return_m.zc +++ /dev/null @@ -1,3 +0,0 @@ -// expect: x: has to be u to be returned -fn mk() -> u { var x = new(1); return x; } -fn main() { var y = mk(); return y[0]; } diff --git a/docs/history/10-zc/code/tests/errors/tag_mismatch.zc b/docs/history/10-zc/code/tests/errors/tag_mismatch.zc deleted file mode 100644 index f9631d6..0000000 --- a/docs/history/10-zc/code/tests/errors/tag_mismatch.zc +++ /dev/null @@ -1,2 +0,0 @@ -// expect: c: its tag doesn't match its container's -fn main() { var p = new(2), c = new(1); p as u; p[0] = c; return 0; } diff --git a/docs/history/10-zc/code/tests/errors/u_dropped.zc b/docs/history/10-zc/code/tests/errors/u_dropped.zc deleted file mode 100644 index 76b7765..0000000 --- a/docs/history/10-zc/code/tests/errors/u_dropped.zc +++ /dev/null @@ -1,2 +0,0 @@ -// expect: x: u object must leave this block -fn main() { var x = new(3); x as u; return 0; } diff --git a/docs/history/10-zc/code/tests/errors/u_skip_level.zc b/docs/history/10-zc/code/tests/errors/u_skip_level.zc deleted file mode 100644 index b8a024f..0000000 --- a/docs/history/10-zc/code/tests/errors/u_skip_level.zc +++ /dev/null @@ -1,2 +0,0 @@ -// expect: t: is u; it can only be handed to a variable of the enclosing block -fn main() { var r; { { var t = new(1); t as u; r = t; } } return r[0]; } diff --git a/docs/history/10-zc/code/tests/errors/unchecked_touch.zc b/docs/history/10-zc/code/tests/errors/unchecked_touch.zc deleted file mode 100644 index 1f57466..0000000 --- a/docs/history/10-zc/code/tests/errors/unchecked_touch.zc +++ /dev/null @@ -1,2 +0,0 @@ -// expect: x: is tracked by the analyzer and can't be used in unchecked code -fn main() { var x = new(1); unchecked { x[0] = 1; } return 0; } diff --git a/docs/history/10-zc/code/tests/errors/untagged_param.zc b/docs/history/10-zc/code/tests/errors/untagged_param.zc deleted file mode 100644 index 5a044c6..0000000 --- a/docs/history/10-zc/code/tests/errors/untagged_param.zc +++ /dev/null @@ -1,3 +0,0 @@ -// expect: x: is an owned object; it can only be passed to an m or d parameter -fn f(p) { return 0; } -fn main() { var x = new(1); f(x); return 0; } diff --git a/docs/history/10-zc/code/tests/errors/unused.zc b/docs/history/10-zc/code/tests/errors/unused.zc deleted file mode 100644 index cbc6129..0000000 --- a/docs/history/10-zc/code/tests/errors/unused.zc +++ /dev/null @@ -1,2 +0,0 @@ -// expect: x: m object is never used -fn main() { var x = new(3); return 0; } diff --git a/docs/history/10-zc/code/tests/errors/use_after_give.zc b/docs/history/10-zc/code/tests/errors/use_after_give.zc deleted file mode 100644 index 5225462..0000000 --- a/docs/history/10-zc/code/tests/errors/use_after_give.zc +++ /dev/null @@ -1,3 +0,0 @@ -// expect: x: used after it was given away -fn take(d p) { return p[0]; } -fn main() { var x = new(3); take(x as d); return x[0]; } |
