https://issues.dlang.org/show_bug.cgi?id=23972
--- Comment #5 from Bolpat <[email protected]> --- (In reply to Dennis from comment #4) > I think the spec is wrong (or too vague) here. The interface object has a > slightly different address than the class object, so the pointers aren't > equal. > `is` should be a simple bit compare, and not be doing casting logic for > classes. No, in this case, it shouldn't. If one actually wants to compare the pointer values, one can always cast to `void*` and compare the pointers. The fact that the class handles are represented by pointers is really an implementation detail. The current behavior is both surprising and useless. If the `is` operator does not provide class object identity, it should not be there at all; the error message in that case could point out that an explicit cast to Object is needed, but if that's what programmers will do anyways, why not provide something like an operator for it that does The Right Thing™? --
