[Issue 5060] Order of interface implementations affects code

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Sep 17 13:05:41 PDT 2013


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



--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-09-17 13:05:41 PDT ---
P.S.: OP code is missing an import to std.stdio.

Perhaps the right way to implement this is to simply allow shadowing via an
alias declaration:

class One : Foo, Bar
{
    alias Foo.run run;  // pick Foo's run, hide Bar's run
}

class Two : Bar, Foo
{
    alias Bar.run run;  // do the opposite
}

Otherwise, emit a compiler error. Thoughts?

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