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

fix: Make fields in tuple structs public #2994

Merged
merged 3 commits into from
May 30, 2024
Merged

fix: Make fields in tuple structs public #2994

merged 3 commits into from
May 30, 2024

Conversation

cryptopapi997
Copy link
Contributor

Currently when defining a tuple struct in an external program such as struct T(pub u32), declare_program! will transform this into struct T(u32). This effectively means initializing T in the program importing it isn't possible. This also differs from how normal structs work where each field is automatically made public. This PR changes this for tuple structs and makes each field of the tuple public too.

Copy link

vercel bot commented May 30, 2024

@cryptopapi997 is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@cryptopapi997 cryptopapi997 changed the title Make fields in tuple structs public fix: Make fields in tuple structs public May 30, 2024
@acheroncrypto acheroncrypto added lang fix Bug fix PR labels May 30, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@acheroncrypto acheroncrypto left a comment

Choose a reason for hiding this comment

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

Yep, they should be public. Thanks!

@acheroncrypto acheroncrypto merged commit 5601702 into coral-xyz:master May 30, 2024
47 of 48 checks passed
@cryptopapi997 cryptopapi997 deleted the pub-tuple-structs branch May 30, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix PR lang
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants