Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cgen: fix assign generated code for if ternary non-opt value to option struct member #19485

Merged
merged 6 commits into from
Oct 20, 2023

Conversation

felipensp
Copy link
Member

@felipensp felipensp commented Sep 30, 2023

Fix #19477

🤖 Generated by Copilot at b3dc7b2

Fix code generation bug for option type returns in cgen.v. Use correct types for casting and error checking.

🤖 Generated by Copilot at b3dc7b2

  • Fix option type return bug in code generation (link)

@felipensp felipensp changed the title cgen: fix value being assigning to option struct member cgen: fix assign generated code for if ternary non-opt value to option struct member Sep 30, 2023
@felipensp felipensp marked this pull request as ready for review October 19, 2023 11:04
@spytheman spytheman merged commit b3d1b04 into vlang:master Oct 20, 2023
51 checks passed
@felipensp felipensp deleted the fix_opt_assign_expr branch December 20, 2023 19:15
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.

inline if statement generates C error with struct option fields
2 participants