www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15793] New: Change !is error to warning

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

          Issue ID: 15793
           Summary: Change !is error to warning
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: dfj1esp02 sneakemail.com

interface A { void f(); }
void f(A a)
{
    if(a!=null)a=null;
}

Error: use '!is' instead of '!=' when comparing with null

Mother of god.

--
Mar 12 2016