-
-
Notifications
You must be signed in to change notification settings - Fork 706
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 19105 - Bogus recursive template expansion via getSymbolsByUDA #7100
Conversation
|
Thanks for your pull request and interest in making D better, @RazvanN7! 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 fetch digger
dub run digger -- build "master + phobos#7100" |
|
This should have that as a test then. |
0f90b9f to
86733d5
Compare
|
@thewilsonator ok. done. |
|
This is the wrong fix for 19105. 19105 is in fact a DMD issue, as can be showed by this code: The problem seems to be with caching in the compiler, and the only thing this PR has changed is it's made valid use cases fail to compile. Here's a reduced test case for the behavior, which doesn't use |
|
CC @RazvanN7 |
|
Ping. Still in 2.088 beta |
Issue 19105 was reported as a compiler bug. The reported code is:
But reading the docs of
getSymbolsByUDAis seems that it was meant to work only with aggregate declarations (not with modules). I added a template constraint that requires that the symbol passed is an aggregated type.The code fails because while getting the members of
junk, the innards ofgetSymbolsByUDAuses aliases for the list of symbols and at some point alias C ends up aliasing to something that aliases itself.