www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21671] New: Position of the `default` label in switch


          Issue ID: 21671
           Summary: Position of the `default` label in switch statement
                    affects warnings
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: andrei erdani.com

Per https://github.com/s-ludwig/taggedalgebraic/pull/65, changing the position
of `default` in a switch with no fallthrough affects eliminates a warning. That
shouldn't be  the case because the code is semantically equivalent regardless
of the placement of the label.

Mar 01 2021