Skip to content

Fix tuple member-array index capture in Lua - #1278

Merged
Frotty merged 1 commit into
masterfrom
codex/fix-tuple-member-array-index
Sep 2, 2026
Merged

Fix tuple member-array index capture in Lua#1278
Frotty merged 1 commit into
masterfrom
codex/fix-tuple-member-array-index

Conversation

@Frotty

@Frotty Frotty commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

  • treat member-array index expressions as reads during IM read-variable analysis
  • preserve tuple l-value index captures through dead-store elimination
  • add a regression covering the reported class-field tuple-array assignment in Jass and Lua

Acceptance criteria

  • generated Lua declares and initializes tuple l-value index temporaries before use
  • the reported tuple-array assignment executes without a nil-index failure
  • Jass transform modes and Lua execution produce the expected stored tuple and slot count

Verification

  • ./gradlew test --tests "tests.wurstscript.tests.LuaBackendAuditTests.tupleMemberArrayAssignmentCapturesIndex" — passed
  • ./gradlew test --tests "tests.wurstscript.tests.LuaBackendAuditTests" — passed
  • ./gradlew test --tests "tests.wurstscript.tests.TupleTests" — passed
  • ./gradlew test — passed (6m 13s)
  • git diff --check — passed

Known gaps

None.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T08:44:22.175405Z fbd8179 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Frotty

Frotty commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: fbd8179429

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty
Frotty merged commit 2803032 into master Sep 2, 2026
3 checks passed
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