cgen: fix option reference string interpolation#27760
Conversation
|
This looks good for the direct ?int case, but one case mentioned in #27752 is still missing, an alias such as Could you also handle the aliased option type and add a regression case for it? After that, the issue should be fully covered. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
lots of ci errors |
|
Updated this to cover the aliased option case from the review. What changed:
Verification run locally:
|
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
The red CI jobs appear to share the same root cause, the chained Can you fix it plz? |
|
Updated to avoid the Verification run locally:
|
Fixes #27752
This fixes C generation for string interpolation of references to option values, such as
${&val}wherevalis?int.The interpolation stringification path now materializes the existing option-payload-reference lowering into a temporary before adding the generated nil check/string call, avoiding invalid generated C such as
&&val.data.A regression test covers both a payload option and
none.Tests