[Issue 5399] Return the result of a nonvoid function in a void function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 29 02:03:43 PDT 2011


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


yebblies <yebblies at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies at gmail.com


--- Comment #8 from yebblies <yebblies at gmail.com> 2011-06-29 18:58:29 EST ---
I'll copy what I said in issue 3746:

Without this feature, what should happen with lazy void?

void lazyFunc(lazy void a) { a; }

void main()
{
   int i;
   lazyFunc(i++);
}

lazyFunc(i++) is currently re-written to something like
lazyFunc({return i++;})
This of course is broken if returning a non-void from a void function is
disallowed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list