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 23497 - Erroneous escape reference to parameter error #14686
Conversation
Thanks for your pull request and interest in making D better, @dkorpel! 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 "stable + dmd#14686" |
@@ -1799,7 +1799,7 @@ void escapeByValue(Expression e, EscapeByResults* er, bool live = false, bool re | |||
if (tf.isreturn) | |||
stc |= STC.return_; | |||
if (tf.isreturnscope) | |||
stc |= STC.returnScope; | |||
stc |= STC.returnScope | STC.scope_; |
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.
It's nuts that we have to do this though...
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 agree, I intend to improve it in future PRs, this is just the quickest path to fix the regression. I've been looking already into fixing returnScope
inference without scope
, but it breaks Phobos somehow.
@deadalnix : Care to give this a spin before I merge it, to make sure it fixes the non-reduced problem? |
I'm unable to run the compiler on the whole project, so this will have to do. |
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.
crazy but it'll do
Supersedes the revert #14677