Skip to content

Handle unused locals without scope metadata#199

Open
hunterbastian wants to merge 1 commit into
Syncleus:masterfrom
hunterbastian:fix-unused-scope
Open

Handle unused locals without scope metadata#199
hunterbastian wants to merge 1 commit into
Syncleus:masterfrom
hunterbastian:fix-unused-scope

Conversation

@hunterbastian
Copy link
Copy Markdown

Fixes #96.

Summary:

  • Preserve RHS expression emission when javac omits local variable metadata for an unused local assignment.
  • Keep named local assignments, declarations, and newarray assignments on the existing path.
  • Re-enable arbitrary-scope and runtime regression coverage for unused locals at the end of a scope.

Verification:

  • Maven test-compile succeeded.
  • Direct JUnit passed 6 tests: codegen ArbitraryScopeTest, codegen NullCheckTest, and runtime ArbitraryScopeTest.

Note: I did not include any payment details in this PR. Those can be handled privately after acceptance if needed.

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.

[Bounty $20] Unused variable at end of scope results in OutOfScope exceptions

1 participant