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

Should deriving InvariantFree require that a structs fields are the same pub level as the struct? #18

Open
rylev opened this issue May 25, 2020 · 1 comment
Labels
question Further information is requested
Milestone

Comments

@rylev
Copy link
Collaborator

rylev commented May 25, 2020

Since InvariantFree types are meant to represent types without invariants, it should reason that all the fields of the type should be accessible. Should we require that a structs fields are the same visibility level as the struct itself?

@rylev rylev added the question Further information is requested label May 25, 2020
@rylev rylev added this to the v0.1 milestone May 25, 2020
@RustyYato
Copy link
Collaborator

No, it should be fine for the fields to be more private than the struct. There doesn't seem to be any reason to make this restriction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants