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

           Summary: alias this ignores invariant()
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: simen.kja...@gmail.com


--- Comment #0 from Simen Kjaeraas <simen.kja...@gmail.com> 2010-12-10 05:17:58 
PST ---
struct foo {
    int data;
    alias data this;
    invariant() {
        assert( data == 0 );
    }
}

void bar( ) {
    foo f;
    f = 4; // No assert
}

Not sure if this will ever be fixed, or even is supposed to, but I feel it is
worth adding here.

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

Reply via email to