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

Compiler: fix inherited visibility of macro hooks #8796

Merged
merged 1 commit into from
Feb 13, 2020

Conversation

asterite
Copy link
Member

Fixes #8794

When expanding a macro we always pass a related ASTNode and were taking the visibility from it. The problem is, on macro hooks the node was the class definition, and if it was private it was taken from that which was wrong.

To make the code simpler, now the macro expansion code requires an explicit visibility to be passed. Then in all places I made sure to pass the correct visibility. For macro hooks the initial visibility should always be public.

@bcardiff bcardiff merged commit 64213d0 into master Feb 13, 2020
@bcardiff
Copy link
Member

Nice spec :-). Great way to start the day. Thanks!

@bcardiff bcardiff deleted the bug/macro-visibility branch February 13, 2020 12:41
@asterite
Copy link
Member Author

Nice spec :-)

Haha 😅

I wanted to reduce it but just in case I left it as is to be sure I'm fixing the actual issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression bug regarding visibility of initializers
2 participants