Bug 7828 – Cannot alias function declared in supertype

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-05T03:45:00Z
Last change time
2013-02-08T15:36:42Z
Assigned to
nobody
Creator
samukha
See also
http://d.puremagic.com/issues/show_bug.cgi?id=6842

Comments

Comment #0 by samukha — 2012-04-05T03:45:33Z
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 ***