Linker errors with Interfaces
Andrej Mitrovic
andrej.mitrovich at gmail.com
Wed Aug 11 06:51:09 PDT 2010
Reading from TPDL again, the "final void thereandback()" method in the
interface is what the user code is expected to call. That method calls two
private methods. But it will call the two private methods in the interface,
not the two from the derived class (since private methods are not virtual).
E.g. calling thereandback() explicitly from a derived object will call the
interface method, since it is final, which then calls the private methods
from the interface.
It's like a dead-end here.
On Wed, Aug 11, 2010 at 3:23 PM, Andrej Mitrovic <andrej.mitrovich at gmail.com
> wrote:
> DMD and TDPL will get in sync one day, I hope.
>
> 2010/8/11 Adrian Matoga <epi at atari8.info>
>
> I get these in both cases:
>>>
>>> output\interface_test.obj(interface_test) Error 42: Symbol Undefined
>>> _D14interface_test14Transmogrifier12transmogrifyMFZv
>>> output\interface_test.obj(interface_test) Error 42: Symbol Undefined
>>> _D14interface_test14Transmogrifier14untransmogrifyMFZv
>>>
>>
>> I reported this as a bug a few days ago:
>> http://d.puremagic.com/issues/show_bug.cgi?id=4542
>>
>> I like the NVI idiom and hope this will finally work in future releases.
>>
>> Adrian
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20100811/824fc9b0/attachment.html>
More information about the Digitalmars-d
mailing list