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

Visibility check for modules is broken #6673

Closed
jjcnn opened this issue Oct 25, 2024 · 2 comments · Fixed by #6685
Closed

Visibility check for modules is broken #6673

jjcnn opened this issue Oct 25, 2024 · 2 comments · Fixed by #6685
Assignees
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen

Comments

@jjcnn
Copy link
Contributor

jjcnn commented Oct 25, 2024

The visibility of modules is currently checked incorrectly.

The following module structure illustrates the problem:

               root module (public by default)
                          |
                          |
                      module b  (private)
                    /         \ 
                   /           \ 
       module c (public)     module d 

Currently any item declared in c is invisible to d, because the visibility of b is private. This is incorrect, since d is behind the same visibility "wall" as c, namely the privacy of b.

My understanding is that items from c should also be visible in b, but I'm not 100% sure of that. We should check what Rust does here.

@jjcnn jjcnn added bug Something isn't working good first issue Good for newcomers compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen labels Oct 25, 2024
@abdegenius
Copy link

Hey good day @jjcnn can i be assign this issue please? thank you!

@maxtalantsev
Copy link

cool

@jjcnn jjcnn self-assigned this Oct 31, 2024
@jjcnn jjcnn removed the good first issue Good for newcomers label Oct 31, 2024
@jjcnn jjcnn mentioned this issue Nov 1, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants