-
Notifications
You must be signed in to change notification settings - Fork 234
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
Warn on items more private than others #6248
Labels
enhancement
New feature or request
Comments
No, I didn't start yet, so feel free to assign it to Akosh :-) |
Tests can go into compiler/noirc_frontend/src/tests/visibility.rs |
5 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Oct 19, 2024
… fields (#6296) # Description ## Problem\* Resolves #6248 ## Summary\* Issue warnings in more cases when a public item refers to private types: * public fields of a public struct fields using private types * a public function taking or returning private types ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[For Experimental Features]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [ ] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
For example in this Rust code:
Rust says that
Foo
is more private thanbar
.We should do the same in Noir and also in similar cases (for example when defining a struct with fields that are more visible than the struct).
Happy Case
Noir warns/errors in the above snippet and similar ones.
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: