Skip to content

fix: preserve forward local temporary-array return types#87

Merged
luisleo526 merged 1 commit into
mainfrom
fix/forward-local-identity-return
Jul 19, 2026
Merged

fix: preserve forward local temporary-array return types#87
luisleo526 merged 1 commit into
mainfrom
fix/forward-local-identity-return

Conversation

@luisleo526

Copy link
Copy Markdown
Contributor

Summary

  • reconcile an adjacent one-hop ordinary local identity return after a later zero-argument UDF primitive type becomes known
  • reuse the already-captured temporary-array initializer without revisiting stateful AST call sites
  • fail closed for typed/persistent, non-adjacent, recursive, shadowed alias-path, parameterized, and non-direct shapes

This is deliberately narrower than general alias inference: only one unique adjacent ordinary declaration whose initializer is the established direct temporary-array read may participate.

Validation

  • focused forward-local suite: 45/45
  • full native suite: 2,203 passed, 2 skipped
  • release self-test: green
  • Pyodide/release parity: 277/277
  • exhaustive 2^5 differential: base 12/16, candidate 16/16 across 32 executions
  • exact 915-source differential: zero output/error changes
  • git diff --check and Python compile checks: green

Separate residual

The direct-terminal element-callee shadow fast path remains a separate pre-existing lane: base and this candidate are byte-identical across its N=3 eight-cell matrix. This PR neither claims nor masks that fix; it will be handled independently with four no-shadow positive controls.

@luisleo526
luisleo526 merged commit edfbdfd into main Jul 19, 2026
9 checks passed
@luisleo526
luisleo526 deleted the fix/forward-local-identity-return branch July 19, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant