Result: done
Files: crates/nikaia-std/src/tools/check_core_places.nika crates/nikaia-std/src/tools/check_core_stmt.nika crates/nikaia-std/src/tools/check_flow.nika crates/nikaia-std/src/tools/lowered/bounds_walk.rs crates/nikaia-std/src/tools/lowered/check_core_places.rs crates/nikaia-std/src/tools/lowered/check_core_stmt.rs crates/nikaia-std/src/tools/lowered/check_flow.rs tests/compiler/tests/let_field_of_call_result.nika tests/compiler/tests/let_field_of_call_result.stdout
Commit: checker: a let of a field of a call’s owned result moves it out
Body: check_core_stmt_a_place counted every field or index as a place, so let i = f().inner was a lent let and lowered to &f().inner. Now a field or index chain whose root is a call is a place only when that call’s result is lent: check_core_field_walked records in flow.owned_call_bases each call or method call a field is read off whose type is a non-view named type, and check_core_stmt_a_lent_root follows the chain to its root. A call that hands back a ref (h.lent().name, lent_of(h).name) stays a view; a coalesce root (m.get(k) ?? return).f is unchanged (a plain root rule broke build_eval.nika that way). Tools code: bounds_walk.nika bounding_while now moves .values out of the call’s result instead of borrowing it.
Fixes: #1191
Pushed: local a048b4e46aca57149e4ca7a96911d55312e3189b
Tests: new tests/compiler/tests/let_field_of_call_result passes –both-settings in a scratch project; on the step-1 binary it fails (rustc Mismatched types at line 26, 4 errors); the #1183 test still passes; lower-std clean and fixpoint on a private copy; cargo fmt –check and clippy –all-targets -D warnings clean.
Gate: green
Deviation: none
Found: none
Needs: none
Changelog: Lowering: let x = call().field moves the field out of the value the call hands over instead of borrowing a temporary; a field of a call that hands back a ref stays a view (#1191).
Owner: none
Disk freed: none
Attribution:
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01GFeMqxRbtUMiGVyDMxsvEq