diff options
| author | 2026-10-14 05:55:19 +0000 | |
|---|---|---|
| committer | 2026-10-14 05:55:19 +0000 | |
| commit | 05f7b7e09ad503e4eac4f757de0d7329174f6437 (patch) | |
| tree | 768931192a69eff878d8f149c418fff55b0fdf8e /tests/errors/recast_plain.zc | |
| parent | docs: archive the frozen stage code as one compressed tarball (diff) | |
analyzer: close the ownership gaps that stopped the compiler compiling itself
an owned local can now move into a released owner declared in the same or an
outer block, and g = m*x lends a local owner to a global until the global is
assigned again in the same block. leaving that block, giving the local away, or
returning while the lend is open is an error. recasting a plain local now names
it and says it has no ownership to recast.
methdef and syntax_resident use the supported spellings, so make genome reaches
its fixpoint from a clean checkout. runerr.sh reads the first // expect: line,
since the include headers moved it off line 1.
Diffstat (limited to 'tests/errors/recast_plain.zc')
| -rw-r--r-- | tests/errors/recast_plain.zc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/errors/recast_plain.zc b/tests/errors/recast_plain.zc new file mode 100644 index 0000000..7d26f3c --- /dev/null +++ b/tests/errors/recast_plain.zc @@ -0,0 +1,6 @@ +namespace; +include rt; + +// expect: p: isn't an owned object, so there is no ownership to recast +word sink; +fn main() { word p = m*rt.new(4); sink = d*p; return 0; } |
