[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:34:12 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5399
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |clugdbug at yahoo.com.au
--- Comment #9 from Don <clugdbug at yahoo.com.au> 2011-06-29 02:29:05 PDT ---
(In reply to comment #8)
> 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.
What's wrong with
lazyFunc( { i++; return;})
?
--
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