-
-
Notifications
You must be signed in to change notification settings - Fork 609
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 21255: Mangle aliased overload set passed to template alias parameter. #11740
Conversation
|
Thanks for your pull request and interest in making D better, @FeepingCreature! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
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
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#11740" |
|
Please add in the commit message what the change actually does
…On Wed, Sep 16, 2020, 10:40 AM Nicholas Wilson ***@***.***> wrote:
***@***.**** approved this pull request.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11740 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVWSCFS24E25ACNYPPD5G3SGB2XXANCNFSM4ROO5OFA>
.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a better/longer commit message.
Try to explain the problem you are fixing to someone who only has a passing familiarity with DMD.
2079325 to
5cd6281
Compare
|
Commit changed to work differently. The problem is that overload declarations are kind of "fake declarations" without many of the properties DMD expects from ordinary declarations. So when we try to mangle them we run into a cryptic "forward declaration" error arising from DMD thinking they're "default" linkage, because that's So now the commit just bypasses the bit that checks for special cases in declarations, ie. tl;dr: |
|
@FeepingCreature yes please put that into the commit message. |
…ing specialcases for template parameters. The problem is that overload declarations are kind of "fake declarations" without many of the properties DMD expects from ordinary declarations. So when we try to mangle them, DMD thinks they're "default" linkage, because that's LINK.init, and then it errors with "forward declaration" because I guess that can't happen normally? Anyways, there's already code for mangling an overload set; we just have to avoid crashing until we reach it. So now the commit just bypasses the bit that checks for special cases in declarations, ie. pragma(mangle) and extern(C). Why doesn't the handler for Declaration do all this? ¯\_(ツ)_/¯
5cd6281 to
d6f7073
Compare
|
(moved explanation to commit message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope we won't regret this :)
|
Shouldn't. Afaict, this only triggers if dmd would crash anyways. In other words, there's no way we'll ever regret it. :) |
|
@FeepingCreature I hear you. Yeah it's not that big of a deal as long as changes in the future don't break that unstated invariant. |
No description provided.