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

Add getVisibility trait as an alias to getProtection #12089

Merged
merged 1 commit into from
Jan 3, 2021

Conversation

Geod24
Copy link
Member

@Geod24 Geod24 commented Jan 1, 2021

The name is more accurate and can be recommended in the documentation in the future.

The name is more accurate and can be recommended in the documentation in the future.
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @Geod24!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#12089"

@adamdruppe
Copy link
Contributor

Does it work cross module now? There was talk before about changing it to do (aggr, "name") as a string instead of aggr.name because of that.

I don't remember if that was already changed to work regardless but if not this would be a good chance to adjust that too.

@Geod24
Copy link
Member Author

Geod24 commented Jan 1, 2021

I don't remember if that was already changed to work regardless but if not this would be a good chance to adjust that too.

True. Another thing that comes to mind is package visibility. Currently there is no way to know what package it's visible from.
I'm not a user of it myself so I can't tell what are the main use case, but would a __traits(isVisibleFrom, SymbolTested, SymbolFrom) be perhaps a better fit ?

@WalterBright
Copy link
Member

Does it work cross module now?

Behavior changes must be in a separate PR.

@adamdruppe
Copy link
Contributor

adamdruppe commented Jan 2, 2021 via email

@dlang-bot dlang-bot merged commit 47a0e51 into dlang:master Jan 3, 2021
@Geod24 Geod24 deleted the getprotection branch January 3, 2021 16:14
Geod24 added a commit to Geod24/dlang.org that referenced this pull request Jan 8, 2021
dlang-bot pushed a commit to dlang/dlang.org that referenced this pull request Jan 24, 2021
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.

5 participants