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 C struct init when it has default expr #21510

Merged
merged 8 commits into from
May 18, 2024

Conversation

felipensp
Copy link
Member

Fix #21501

@felipensp felipensp marked this pull request as ready for review May 17, 2024 12:00
Comment on lines +22 to +24
assert a.a == b.a
assert b.a == c.bar.a
assert b.b == c.bar.b
Copy link
Member

Choose a reason for hiding this comment

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

I think that if you test against the actual known concrete values here, the tests will be clearer, and failures will be easier to diagnose.

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 fd144b3 into vlang:master May 18, 2024
69 checks passed
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.

using a C struct as a struct field does not adopted default values
2 participants