Skip to content

hy-check/walk: collect calls and fnlits across nested assign target places (Fixes #3762) - #3763

Merged
limitlessprojects merged 1 commit into
limitlessprojects:mainfrom
Burapa-J:fix/walk-assign-target-place-calls-and-fnlits
Nov 6, 2026
Merged

limitlessprojects merged 1 commit into
limitlessprojects:mainfrom
Burapa-J:fix/walk-assign-target-place-calls-and-fnlits

Conversation

@Burapa-J

@Burapa-J Burapa-J commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #3762

Cause

  1. own_calls (compiler/crates/hy-check/src/walk.rs:545-549) only matched top-level PlaceKind::Index, skipping calls inside PlaceKind::Field (arr[mutate(m)].val = 99), PlaceKind::AddrOf, and nested PlaceKind::Index (mat[mutate(m)][0] = 99) targets.
  2. own_fnlits (compiler/crates/hy-check/src/walk.rs:618-622) only traversed values on Stmt::Assign, skipping Expr::FnLit closures inside assignment target index expressions.

Fix

  • Add recursive place_calls and place_fnlits helpers in compiler/crates/hy-check/src/walk.rs mirroring place_uses.
  • Call place_calls in own_calls and place_fnlits in own_fnlits for all Stmt::Assign targets.
  • Add 4 integration tests in compiler/crates/hy-check/tests/walk_assign_target_place_calls.rs.

Verification

  • cargo test -p hy-check --test walk_assign_target_place_calls (4 passed)
  • cargo test -p hy-check --lib (183 passed)

@github-actions github-actions Bot added the bot:land-candidate Shepherd: fresh, gate-clean, verifiable (set from classify()) label Nov 5, 2026
@Burapa-J
Burapa-J force-pushed the fix/walk-assign-target-place-calls-and-fnlits branch from 5ecb5c0 to 956fe0a Compare November 6, 2026 06:01
@github-actions github-actions Bot added the bot:stale-base Shepherd: behind main beyond threshold label Nov 6, 2026
@limitlessprojects
limitlessprojects merged commit 44af2b9 into limitlessprojects:main Nov 6, 2026
3 checks passed
@limitlessprojects

Copy link
Copy Markdown
Owner

Landed — thank you @Burapa-J. main now includes this PR as merge commit 44af2b93 (trial-tree-asserted d473df3a — the tree differs from your head 956fe0a9 only because the merge carries main's newer state including #3761, and the full battery ran on exactly that merged tree — remote-asserted).

What landed (fixes #3762 — Stmt::Assign target places only collected calls from bare Index targets, so calls/closures nested inside field and addr-of target projections were invisible to the statement's own-calls/own-fnlits attribution):

  • New place_calls / place_fnlits walkers descend target places recursively (Index base+index, Field base, AddrOf base), wired into own_calls and own_fnlits.
  • #123 lineage preserved: closure bodies are still handled as units by the caller — the A5 perimeter keeps flatten/uses/calls outside closure bodies.

Verification evidence (full battery on the merged trial tree):

  • merge gate: clean vs main 4ccbd0b7
  • cargo test --workspace: 452 suites ok, 2924 tests, 0 failed (your walk_assign_target_place_calls.rs: +117 lines, all green)
  • corpus harness: 135/135 verdict agreement, tripwire not fired
  • differential FULL: accept 45/45, reject 90/90 — FULL AGREEMENT

Bounty rail: per BOUNTY.md / discussion #295.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:land-candidate Shepherd: fresh, gate-clean, verifiable (set from classify()) bot:stale-base Shepherd: behind main beyond threshold

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hy-check/walk: collect calls and fnlits across nested Stmt::Assign target places (HYB-E3102 / HYB-E3006 / HYB-E3002)

2 participants