[Issue 6492] New: properties of alias this'd array overrides method

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 14 09:35:09 PDT 2011


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

           Summary: properties of alias this'd array overrides method
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: mrmocool at gmx.de


--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-08-14 09:35:08 PDT ---
import std.stdio;
struct F
{
    int[] g;
    alias g this;

    auto ptr()
    {
        return g.ptr;
        write("ptr\n");
    }
}

void main()
{
    F a;
    auto p = a.ptr;
}

prints nothing even though ptr method should override g's .ptr

-- 
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