[JsonGen] Fix enum index - #328
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new enum local declaration causes a duplicate C++ variable definition in the existing JsonEnum conversion path, which will fail compilation.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the JSON-RPC code generator’s FromString() emission logic so enum parameters are handled in the local-variable emission path (aligning enums with integers/booleans during local setup).
Changes:
- Extend
EmitLocals()to treatJsonEnumsimilarly to integer/boolean types for local variable declaration.
File summaries
| File | Description |
|---|---|
JsonGenerator/source/rpc_emitter.py |
Adds JsonEnum to the EmitLocals() type handling in FromString() so enum locals are emitted. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟢 Approval recommended
The changes are small, consistent with existing integer/boolean handling, and directly address enum local scoping/redeclaration in generated output.
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Lite
JsonGenerator ResultsNo changes detected. |
No description provided.