[Issue 5622] New: [qtd] Static members imported with "alias this" are inaccessible

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 20 08:52:04 PST 2011


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

           Summary: [qtd] Static members imported with "alias this" are
                    inaccessible
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: samukha at voliacable.com


--- Comment #0 from Max Samukha <samukha at voliacable.com> 2011-02-20 08:49:26 PST ---
class A
{
    enum E
    {
        value
    }

    alias E.value value;

    static void foo()
    {
    }
}

class B
{
    A a;
    alias a this;
}

void main()
{
    enum v = B.E.value;
    enum v2 = B.value;
    B.foo();
}

Error: 'this' is only defined in non-static member functions, not main

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