[Issue 2565] Should be able to use an inherited method as interface implementation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Feb 5 14:03:20 PST 2013


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



--- Comment #7 from Stewart Gordon <smjg at iname.com> 2013-02-05 14:03:18 PST ---
(In reply to comment #6)
> (In reply to comment #5)
> > but the means should be explicit.
> 
> This could be implementable via a mixin template, similar to how forwarding
> constructors were proposed in Issue9066. A general-purpose template could be
> written which could be used via:
<snip>
>     // which expands to:
>     override int foo() { return FooImpl.foo(); }
>     override int bar() { return FooImpl.bar(); }

Why do you need a mixin to do this?  ISTM you might as well just insert these
directly in your code.  In any case, what you're suggesting doesn't seem to me
to be an explicit way of using _an_ inherited method as _an_ interface
implementation.  Moreover, how does it accommodate the case where FooImpl.foo
is final?

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