Skip to content

fix(codegen): allow inline local assignments in call args#226

Open
duongynhi000005-oss wants to merge 1 commit into
Syncleus:masterfrom
duongynhi000005-oss:bounty-issue97-inline-assign
Open

fix(codegen): allow inline local assignments in call args#226
duongynhi000005-oss wants to merge 1 commit into
Syncleus:masterfrom
duongynhi000005-oss:bounty-issue97-inline-assign

Conversation

@duongynhi000005-oss
Copy link
Copy Markdown

Fixes #97.

What changed

  • remove the hard failure for INLINE_ASSIGN when the assignment carries declaration metadata
  • always emit the inline assignment expression (var=rhs) in call-argument position
  • convert AssignAndPassAsParameterSimple from expected CodeGenException to expected OpenCL output

Why

int z; actuallyDoIt(z = 1); should compile to a valid inline assignment expression. Throwing in this code path blocks valid Java patterns and caused issue #97.

Verification

  • Environment limitation: Maven unavailable in runner (mvn: command not found) and apt install failed due to disk-space constraints, so full test run could not be executed here.
  • Updated regression expectations in:
    • src/test/java/com/aparapi/codegen/test/AssignAndPassAsParameterSimple.java
    • src/test/java/com/aparapi/codegen/test/AssignAndPassAsParameterSimpleTest.java

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] Inline declarations throw exception.

1 participant