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
Issue 20997 - Missing example of scope guard executing after return statement #3520
Conversation
Thanks for your pull request and interest in making D better, @BVRazvan! 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
|
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.
Please include the issue description in the commit message.
spec/statement.dd
Outdated
) | ||
|
||
A return lies inside the scope of a function; therefore, a $(D scope()) | ||
statement will be executed subsequently. |
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.
There's no need for this sentence.
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.
Changed it, please check.
spec/statement.dd
Outdated
$(CONSOLE | ||
Inside bar() | ||
Inside foo() | ||
) |
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.
Please move this example so that it is grouped with the others.
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.
Moved it, please check.
Please squash commits. The git history seems to be messed up. |
411ce32
to
6aee44f
Compare
Issue link: https://issues.dlang.org/show_bug.cgi?id=20997
I added an example to clarify the order of execution when scope() statement interferes with return statement.