On Thu, Jun 2, 2011 at 10:31 AM, Steven Schveighoffer
<schvei...@yahoo.com> wrote:
> Private methods are non-virtual, so I'm pretty sure they are not supposed to
> be allowed in an interface.
>
> But I suppose private could also mean private final, in which case you have
> to provide an implementation for foo in the interface.

In section 6.9.1 of "The D Programming Language" about Non-Virtual
Interfaces, there is an example (p214) of an interface which defines
two private methods without implementation.  But now that you point it
out, that code also fails the linker for me.  Is that book out of sync with
the implementation?

> This would be in line with the error message.

It is true that if I replace "private" with "final" I get the same
error message.  That is also puzzling to me; I would expect a final
method in an interface without an implementation to be a *compiler*
error, since there is no way anyone else can implement it.  Is there?

Mike

Reply via email to