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

           Summary: "this" in classes should not an lvalue
           Product: D
           Version: D1 & D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: jema...@earthlink.net


--- Comment #0 from John Mandeville <jema...@earthlink.net> 2010-09-05 09:05:44 
PDT ---
"this" is treated as an lvalue.  For classes, it should
be an rvalue.  In particular, the following absurdity
compiles in v1.063 and v.2.047 but should not.

class Yikes
{
    int i;
    this() { this = null; }
}


void main()
{
    auto y = new Yikes();
}

See also discussion at
http://www.digitalmars.com/d/archives/digitalmars/D/this_as_lvalue_116836.html

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

Reply via email to