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

Fix Issue 18624 - wrong behavior of getSymbolsByUDA if one of the symbols having th… #6290

Merged
merged 1 commit into from
Mar 17, 2018
Merged

Fix Issue 18624 - wrong behavior of getSymbolsByUDA if one of the symbols having th… #6290

merged 1 commit into from
Mar 17, 2018

Conversation

Spoov
Copy link
Contributor

@Spoov Spoov commented Mar 16, 2018

…e UDA is a function

The last change to getSymbolsByUDA introduced a bug, causing it to ignore some symbols

@dlang-bot
Copy link
Contributor

dlang-bot commented Mar 16, 2018

Thanks for your pull request and interest in making D better, @Spoov! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the annotated coverage diff directly on GitHub with CodeCov's browser extension
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
18624 regression getSymbolsByUDA produces wrong result if one of the symbols having the UDA is a function

std/traits.d Outdated
@Attr void c();
}

static assert(getSymbolsByUDA!(A, Attr).length == 3);
Copy link
Member

Choose a reason for hiding this comment

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

Why don't you check the result directly?
(would be more robust)

A simple way would be getSymbolsByUDA!(A, Attr).stringof == "tuple(a, a, c)"

@wilzbach
Copy link
Member

As this is a regression it would be great if you could open an issue for it and reference it in the commit message (git commit --amend).

Also it should be rebased to stable:

git rebase --onto upstream/stable upstream/master

See the message of dlang-bot for details.

@Spoov Spoov changed the base branch from master to stable March 17, 2018 13:46
@Spoov Spoov changed the title Fix wrong behavior of getSymbolsByUDA if one of the symbols having th… Fix Issue18624 - wrong behavior of getSymbolsByUDA if one of the symbols having th… Mar 17, 2018
@Spoov Spoov changed the title Fix Issue18624 - wrong behavior of getSymbolsByUDA if one of the symbols having th… Fix Issue 18624 - wrong behavior of getSymbolsByUDA if one of the symbols having th… Mar 17, 2018
@wilzbach wilzbach mentioned this pull request Mar 17, 2018
@wilzbach
Copy link
Member

See also #6292 - that's why linking to the PR is a good idea ...

@Spoov
Copy link
Contributor Author

Spoov commented Mar 17, 2018

This is my first Pull Request / Issue here so i didn't tough of doing it. I hope i remember doing it next time :)

@wilzbach wilzbach merged commit e5d92c1 into dlang:stable Mar 17, 2018
@wilzbach
Copy link
Member

No worries. Nobody is perfect - especially on the first run.
Thanks a lot for your contribution! This will be part of of 2.079.1 - it will be released ~ 1.4.18

@Spoov Spoov deleted the fix_getSymbolsByUDA branch March 17, 2018 21:20
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.

3 participants