DMD 1.028 on linux does not issue an error for class types compared against null literal.
Comment #1 by yebblies — 2012-01-29T19:56:40Z
*** Issue 6444 has been marked as a duplicate of this issue. ***
Comment #2 by yebblies — 2012-01-29T19:58:12Z
Works on current dmd (1.068 & 2.058)
void main()
{
class C {}
C c;
if (c != null) {}
if (c == null) {}
}
Prints:
testx.d(5): Error: use '!is' instead of '!=' when comparing with null
testx.d(6): Error: use 'is' instead of '==' when comparing with null