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 example for __traits(identifier). #1899

Merged
merged 1 commit into from
Sep 26, 2017
Merged

Conversation

quickfur
Copy link
Member

The description of __traits(identifier) alone is rather difficult to understand if you don't already know what it means.

@dlang-bot
Copy link
Contributor

dlang-bot commented Sep 25, 2017

Thanks for your pull request, @quickfur!

Bugzilla references

Auto-close Bugzilla Description
17856 __traits( identifier ) could use examples in on line documentation.

spec/traits.dd Outdated
---
string fun() { return "abc"; }

pragma(msg, fun); // "abc"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line should be removed, or at least explained, because if you're new to D it'll be very confusing as to why it prints "abc" and not "fun".

@quickfur
Copy link
Member Author

Cooked up a different, better example instead.

Copy link
Member

@PetarKirov PetarKirov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PetarKirov PetarKirov dismissed MetaLang’s stale review September 26, 2017 13:22

The request for changes was fulfilled, AFAICS

@dlang-bot dlang-bot merged commit d6aa91f into dlang:master Sep 26, 2017
@quickfur quickfur deleted the issue17856 branch September 26, 2017 16:00
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.

4 participants