Files
ViperC/App/lib/core
TermiNexus f31c1dbc78 feat(own): enforce move use-after-move and reject pointer-to-value transfer
Compiler:
- moving an owned value (`b: own T = a`) marks the source released; this
  now also applies outside OBS files when the target is declared `own`.
  Later reads/field access fail with a LifetimeError.
- transferring an owned pointer into a value-typed target
  (`_U3: U = _U2`) now fails with CastError before codegen. Previously it
  emitted a bitcast of the struct value to a pointer and died in mlir-opt.

LSP:
- track `own` declarations and moves per function and report
  "cannot use 'x': its value was moved" as an error diagnostic on later
  uses (severity 1, so editors paint it red).
- a rebinding clears the moved state.

Probe: `_U: own U = new U(1); _U2: own U = _U; print(_U2.a)` is clean;
`print(_U.a)` produces the move diagnostic and the compiler LifetimeError;
`_U3: U = _U2` produces the CastError. Self-host 110/110; ListTest,
GenericTest, GenericTest3/4, PtrOpProbe, HashLibTest, NewTest,
NewLifetimeTest, StructTest, EscapeOkTest and OopInheritTest pass.
2026-11-02 19:52:59 +08:00
..