www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22019] New: `case 1,:` allowed by grammar but not DMD

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

          Issue ID: 22019
           Summary: `case 1,:` allowed by grammar but not DMD
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: spec
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: dlang-bugzilla thecybershadow.net
          Reporter: dlang-bugzilla thecybershadow.net

////// test.d //////
void main()
{
    final switch (1)
    {
        case 1,:
            break;
    }
}
////////////////////

Allowed in grammar (CaseStatement -> ArgumentList which may end with ,) but not
by DMD.

--
Jun 12 2021