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.
Comment #1 by andrej.mitrovich — 2013-02-08T15:35:12Z
Likely caused by the same thing as Issue 6842.
Comment #2 by andrej.mitrovich — 2013-02-08T15:36:42Z
*** This issue has been marked as a duplicate of issue 3452 ***