December 12, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7100

           Summary: rvalue binds to ref argument
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: andrei@metalanguage.com


--- Comment #0 from Andrei Alexandrescu <andrei@metalanguage.com> 2011-12-12 15:42:36 PST ---
I am sure this bug has been filed, but it doesn't have the right keywords so I couldn't find it. If anyone does, please make that a dupe of this.

struct abc
{
   ref abc opAssign(ref abc rhs)
   {
       writeln("opAssign");
       return this;
   }
}

void
main(string[] argv)
{
   abc x;
   x= abc();
}

The code shouldn't compile. I fished this one from a lost email from June 6, 2010.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 13, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7100


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-12-12 19:55:10 PST ---
Current dmd implementation marks struct literal and construction as lvalue.

*** This issue has been marked as a duplicate of issue 5889 ***

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