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
Move toParentDecl
to toParentLocal
and make a new toParentDecl()
which follows the declaration scope even for static templates
#9647
Conversation
Thanks for your pull request and interest in making D better, @SSoulaimane! 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 + dmd#9647" |
Is this fixing some issue? In that case please create a bugzilla issue and reference so it show up in the changelog. |
db3497b
to
ffd3268
Compare
Yes it is. Added. |
b1333d5
to
eed7f4a
Compare
a087cb0
to
25eeea4
Compare
toParentDecl()
follow the declaration scope even for static templatestoParentDecl
to toParentLocal
and make a new toParentDecl()
which follows the declaration scope even for static templates
Since some code relies on the current behavior I kept it under a different name |
25eeea4
to
3b62464
Compare
This is the correct behavior.
Includes a test case.
Edit: some code such as
test/compilable/b16483.d
and some tests I added relied on the old behavior so I kept it with another variant calledtoParentLocal()
which doesn't follow non-local (i.e. global and static) templates.toParentLocal
is even more useful when two local contexts exist (#9282).