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

           Summary: composition with alias this doesn't work inside the
                    struct
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: mrmoc...@gmx.de


--- Comment #0 from Trass3r <mrmoc...@gmx.de> 2011-08-12 12:56:34 PDT ---
struct Memory
{
    int foo;
}
struct Image
{
    Memory sup;
    alias sup this;

    void bla()
    {
        foo = 1;
    }
}

$ dmd -c test.d 
DMD v2.054 DEBUG
test.d(12): Error: undefined identifier foo

Using this.foo = 1 fixes it.

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

Reply via email to