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

           Summary: Need a better diagnostic on accessing 'alias this' to
                    private symbols
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Andrej Mitrovic <[email protected]> 2013-03-24 
19:39:08 PDT ---
module foo;

struct S
{
    void func() { }
}

struct X
{
    public alias s this;
    private S s;
}

module test;

import foo;

void main()
{
    X x;
    x.func();
}

$ rdmd test.d
> test.d(8): Error: undefined identifier 'func'

I'm not exactly sure, perhaps the public alias to a private symbol should be
disallowed in the first place. Otherwise a better diagnostic should be made.

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

Reply via email to