Bug 6444 – Using != to compare with null does not cause a compiler error

Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2011-08-06T13:17:00Z
Last change time
2012-01-29T19:56:40Z
Assigned to
nobody
Creator
eatingstaples

Comments

Comment #0 by eatingstaples — 2011-08-06T13:17:17Z
When using the == operator to compare a class reference to null, the compiler gives an error, telling the programmer to use the "is" operator instead. However, using the != operator fails to generate a similar message.
Comment #1 by yebblies — 2012-01-29T19:56:40Z
*** This issue has been marked as a duplicate of issue 1896 ***