[Issue 15793] Change !is error to warning
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Mar 13 09:43:13 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=15793
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
Severity|regression |enhancement
--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> ---
Some backstory:
Originally, if a was actually null, this would cause a segfault (it would try
to call a.opEquals(null), which was a virtual call, etc.). This is why the
error was added -- any usage of != null for classes/interfaces was never what
you really wanted.
But with the current way object comparisons are done, != null would do the
correct thing. I think actually, we can remove the error completely.
--
More information about the Digitalmars-d-bugs
mailing list