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

           Summary: Cannot assign null to a class with 'alias this'
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: osa8...@gmail.com


--- Comment #0 from osa8...@gmail.com 2010-10-26 13:34:54 PDT ---
If class has 'alias this' for a struct member, attempt to assign null to a
class instance fails:
------
struct Foo {}
class Bar {
    Foo foo_;
    alias foo_ this;
}
void main() {
    Bar a;
    a = null;
}
------
aliasthis1.d(8): Error: cannot implicitly convert expression (null) of type
void* to Foo

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

Reply via email to