www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19882] New: Expected 'undefined identifier' error when type

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

          Issue ID: 19882
           Summary: Expected 'undefined identifier' error when type
                    comparing
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: patric.dexheimer gmail.com

void main()
{
    static if( is(undefined_id == int) ) pragma(msg, "OK");
        //compiles
        //oops

    //static if( is(int == undefined_id ) ) pragma(msg, "OK"); 
        //Error: undefined identifier undefined_type 
        //as expected
}

--
May 17 2019