[Issue 21671] New: Position of the `default` label in switch statement affects warnings

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 1 21:45:00 UTC 2021


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

          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 at puremagic.com
          Reporter: andrei at 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.

--


More information about the Digitalmars-d-bugs mailing list