[Issue 3008] Members of non-lvalues (rvalues) can be assigned to.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 30 13:26:33 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=3008
--- Comment #17 from BCS <shro8822 at vandals.uidaho.edu> 2009-07-30 13:26:32 PDT ---
(In reply to comment #16)
> (In reply to comment #14)
> >
> > See above. Without analyzing the function bodies, Applying all this to
> > functions will also ban things I'm not willing to give up.
> >
> > As an example: should this be alowed:
> >
> > struct S { void M(int arg) { ... } ... }
> > S fn() { ... }
> > fn().M = 5;
> >
> > how about (the equivalent):
> >
> > fn().M(5);
> >
> > how about if I rename it:
> >
> > struct OutputHandle { void Output(int arg) { ... } ... }
> > OutputHandle GetProcessOutput() { ... }
> > GetProcessOutput().Output(5);
>
> ref returns. They are awesome.
You assume that the above is a bug and what I really wanted was to return a
reference. Take another look while assuming that I actual do want return by
value and the return by reference would be a bug.
--
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