[Issue 13362] New: DMD accepts body-less switch

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Aug 22 14:57:18 PDT 2014


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

          Issue ID: 13362
           Summary: DMD accepts body-less switch
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: blah38621 at gmail.com

DMD currently accepts a switch with no actual body (extracted from a parital 
dustmite reduction): 

switch( ch )
    return ;

As a likely directly related issue, DMD also accepts this, although it 
shouldn't:

IRCallingConvention parseCallConvention()
{
    // CallConvention
    switch(tok)
    {
            return IRCallingConvention.d;
    }
}

--


More information about the Digitalmars-d-bugs mailing list