Thread overview
[Issue 7828] New: Cannot alias function declared in supertype
Apr 05, 2012
Max Samukha
Feb 08, 2013
Andrej Mitrovic
Feb 08, 2013
Andrej Mitrovic
April 05, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7828

           Summary: Cannot alias function declared in supertype
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: samukha@voliacable.com


--- Comment #0 from Max Samukha <samukha@voliacable.com> 2012-04-05 03:45:33 PDT ---
struct S
{
    static void foo() {};
}

struct S2
{
    S s;
    alias s this;
}

void main()
{
    S s = S();
    alias S.foo foo1; // (1) ok
    alias s.foo foo2; // (2) ok

    S2.foo(); // ok
    S2 s2 = S2();

    alias S2.s.foo foo4; // (3) ok
    alias S2.foo foo5; // (4) fails, should work
    alias s2.foo foo6; // (5) fails, should work
}

I know many of you believe that (2) should have never worked and all. Regardless, it should be possible to alias any member via subtype that can be aliased via supertype.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 08, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7828


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich@gmail.com
           See Also|                            |http://d.puremagic.com/issu
                   |                            |es/show_bug.cgi?id=6842


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-08 15:35:12 PST ---
Likely caused by the same thing as Issue 6842.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 08, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7828


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #2 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-02-08 15:36:42 PST ---
*** This issue has been marked as a duplicate of issue 3452 ***

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