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

Modify modifier behaviour: "return" should be similar to "break" #686

chriseth opened this Issue Jun 25, 2016 · 2 comments


None yet
2 participants
Copy link

chriseth commented Jun 25, 2016

Currently, a return inside a function body (or more deeply nested modifier) ignores the trailing statements in a modifier with the justification that modifiers are pure syntactic modifications.

This leads to the effect that trailing statements are practically useless because they fact whether they are executed or not depends on whether the control flow exited the function via a return or just via flowing past the end of the function body.

Because of that and to allow "cleanup operations", if the control flow leaves a function or more deeply nested modifier, it should always continue right after the _.

I am currently not aware of any real-world usage of modifiers that would get broken by this change. Please speak up if you think otherwise. :-)


This comment has been minimized.

Copy link

nmushegian commented Jun 26, 2016

related (dupe?) #49


This comment has been minimized.

Copy link

chriseth commented Jul 5, 2016

@nmushegian related, but not a duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment