[Issue 15793] Change !is error to warning

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Mar 14 09:28:12 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=15793

--- Comment #4 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
At this point, comparing null objects will work just fine, since the free
function opEquals that calls the member function opEquals for classes checks
for null first, but if you use is, you skip the call to opEquals entirely. So,
the error is arguably forcing you to follow best practices, but if the error
weren't there, the code would work just fine. It would just be slightly less
efficient.

--


More information about the Digitalmars-d-bugs mailing list