[Issue 7828] New: Cannot alias function declared in supertype
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Apr 5 03:44:56 PDT 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 at puremagic.com
ReportedBy: samukha at voliacable.com
--- Comment #0 from Max Samukha <samukha at 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: -------
More information about the Digitalmars-d-bugs
mailing list