```d interface IOpt(T) { bool opEquals(const IOpt!T) const @safe pure; } class None(T) : IOpt!T { bool opEquals(const IOpt!T other) const @safe pure => true; } void main() { auto a = new None!int(); auto b = new None!string(); assert(a==b); } ```
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?**
- Why this compiles? Antonio via Digitalmars-d-learn
- Re: Why this compiles? Adam D Ruppe via Digitalmars-d-learn