[Issue 7100] New: rvalue binds to ref argument

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Dec 12 15:42:38 PST 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 at puremagic.com
        ReportedBy: andrei at metalanguage.com


--- Comment #0 from Andrei Alexandrescu <andrei at 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: -------


More information about the Digitalmars-d-bugs mailing list