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 array fixed comparison from fn return #23114

Merged

Conversation

felipensp
Copy link
Member

@felipensp felipensp commented Dec 9, 2024

@felipensp felipensp marked this pull request as ready for review December 9, 2024 14:55
Comment on lines +15 to +16
mut x := g.new_ctemp_var(expr, expr_type)
g.gen_ctemp_var(mut x)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not return it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean return g.gen_ctemp_var(mut x)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, then there will be no need for the mut x

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not saying it should, I am just curious why is it needed?
Just for efficiency?

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.

@spytheman spytheman merged commit f773416 into vlang:master Dec 9, 2024
72 checks passed
@felipensp felipensp deleted the fix_fixed_array_compare_eq_ne_from_call branch December 10, 2024 17:55
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.

С error when comparing aliased fixed arrays
2 participants