[Issue 22038] New: final switch error message should report all missing enum members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 18 14:12:33 UTC 2021


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

          Issue ID: 22038
           Summary: final switch error message should report all missing
                    enum members
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dkorpel at live.nl

When turning a normal switch into a final switch, I often go through this
sequence:

- recompile
- Error: `enum` member `A` not represented in `final switch`
- add case for A
- recompile
- Error: `enum` member `B` not represented in `final switch`
- add case for B
- recompile
- Error: `enum` member `C` not represented in `final switch`

etc. It would be more convenient if the compiler didn't stop at the first
missing member.

--


More information about the Digitalmars-d-bugs mailing list