Dlang Polymorphism doesn't work as expected.

Enjoys Math enjoysmath at gmail.com
Sun Sep 4 22:18:53 UTC 2022


On Sunday, 4 September 2022 at 17:50:10 UTC, Enjoys Math wrote:
> On Sunday, 4 September 2022 at 17:43:33 UTC, Enjoys Math wrote:
>> On Sunday, 4 September 2022 at 17:38:54 UTC, Enjoys Math wrote:
>>> On Sunday, 4 September 2022 at 17:36:24 UTC, Enjoys Math 
>>> wrote:
>>>> [...]
>>>
>>> Okay... now the MWE works as I expected polymorphism to work, 
>>> but my complicated library is not doing it right...
>>>
>>> :\
>>
>> Here is a link to the library on github.  Please help me solve 
>> this!! :D
>>
>> https://github.com/enjoysmath/diagram-chaser
>
> Simply git clone it and run from main.d or hit debug in VisualD 
> to see my problem.  It's calling the base class method which 
> throws a NotImplemented exception, but it should be calling one 
> of the derived subclasses.  I will keep coding on it and update 
> the code, but if I get it fixed, I'll post an update here.

Fixed.  I was simply not implementing anything in the subclass.


More information about the Digitalmars-d mailing list