www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13363] New: DMD accepts bodyless if statement

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

          Issue ID: 13363
           Summary: DMD accepts bodyless if statement
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: blah38621 gmail.com

DMD currently accepts the following code:

IRQualifiedName parseQualifiedName()
{
    IRQualifiedName current;

    do
    {

        if((tok))
    AfterProc:
    } while((tok))        return current;
}

--
Aug 22 2014