Skip to content
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 5399 - Return the result of a nonvoid function in a void function #174

Merged
merged 1 commit into from
Oct 9, 2011

Conversation

yebblies
Copy link
Member

Make returning a non-void from a void function an error, and special case lazy void parameters to be re-written as '{ exp; }' instead of '{ return exp; }'.

http://d.puremagic.com/issues/show_bug.cgi?id=5399

This patch is a (preferred) alternative to #121

Make returning a non-void from a void function an error, and special case lazy void parameters to be re-written as '{ exp; }' instead of '{ return exp; }'.
@andralex
Copy link
Member

I support this fix.

WalterBright added a commit that referenced this pull request Oct 9, 2011
Issue 5399 - Return the result of a nonvoid function in a void function
@WalterBright WalterBright merged commit c942d51 into dlang:master Oct 9, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants