Problem
The examples acceptance gate has two ownership-related failures:
ItTestDeclbodies are checked in the preceding function's drop state. A string local namedresultis dropped at the end of one test; a laterit(...)test reusesresultfor an integer, does not register a drop, and is falsely diagnosed as using the earlier dropped variable.ownership_test.homeassigns one owned string directly to another binding and then uses both, even though Home's ownership tests define strings as move-only. The example comment claims both that strings move and that this use should work.
Scope
- Add an ownership flow-state reset that preserves accumulated diagnostics and registered behavior.
- Give function and
ittest bodies isolated ownership/drop/type environments and balanced scopes. - Recognize
string.clone()/string.copy()as returning a string. - Update the ownership example to clone explicitly instead of weakening string move semantics.
- Add focused checker regressions and re-run examples.
Acceptance criteria
- Reusing a local name across adjacent test declarations cannot inherit dropped/moved state.
- String clone/copy calls preserve their receiver for later use.
- Direct string assignment remains a move.
ownership_test.homeandstrings.test.hmpasshome check.