Why this compiles?

Adam D Ruppe destructionator at gmail.com
Sun Nov 26 21:52:14 UTC 2023


On Sunday, 26 November 2023 at 21:45:21 UTC, Antonio wrote:
> In this example,  ```a``` and ```b``` vars are not of the same 
> type and don't implement the same interface.  **why 
> ```assert(a==b)``` compiles?**

They're both subclasses of Object and inherit a generic opEquals 
from that base.


More information about the Digitalmars-d-learn mailing list