coral-xyz / anchor

⚓ Solana Sealevel Framework
https://anchor-lang.com
Apache License 2.0
3.36k stars 1.25k forks source link

fix: Make fields in tuple structs public #2994

Closed cryptopapi997 closed 1 month ago

cryptopapi997 commented 1 month ago

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.

vercel[bot] commented 1 month ago

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

A member of the Team first needs to authorize it.