-
-
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 21489 - Duplicated template instantiation using mixin insid… #12034
Conversation
|
Thanks for your pull request and interest in making D better, @BorisCarvajal! 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#12034" |
41f7e85 to
b112b44
Compare
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.
Thank you for the contribution! However, I do have some requests:
- All code lines need to be covered by tests.
- Can you please explain in a few words what was the problem with the code and how your solution fixes it?
b112b44 to
e8967a8
Compare
The code inside |
|
Comment your code on why are you doing this, it hard for newcomers to understand the internals of the compiler already as it. |
Look at It's easy to follow from that. |
No it is not. There are multiple files that are currently modified by this. |
src/dmd/typesem.d
Outdated
| RootObject o = mt.obj; | ||
| if (o) | ||
| { | ||
| pe = o.isExpression(); | ||
| pt = o.isType(); | ||
| ps = o.isDsymbol(); | ||
| return; | ||
| } |
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.
Comment on why are you checking this.
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.
Remember: RootObject obj; // cached result of semantic analysis.
I'm checking if the object is already cached, if so just return it in the corresponding variable.
| else | ||
| returnExp(e); | ||
| } | ||
| else | ||
| returnError(); | ||
|
|
||
| mt.obj = pe ? pe : (pt ? pt : ps); |
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.
Same thing here. Comment on why please.
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.
Here the opposite. I'm saving the semantic result.
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.
See my comments
e8967a8 to
5459224
Compare
…e alias declaration
5459224 to
53f9379
Compare
…e alias declaration