D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22038 - final switch error message should report all missing enum members
Summary: final switch error message should report all missing enum members
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 enhancement
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2021-06-18 14:12 UTC by Dennis
Modified: 2021-07-07 07:38 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Dennis 2021-06-18 14:12:33 UTC
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.
Comment 1 Dlang Bot 2021-06-18 14:46:17 UTC
@dkorpel updated dlang/dmd pull request #12709 "Fix issue 22038 - final switch error message should report all missing enum members" fixing this issue:

- fix issue 22038 - final switch error message should report all missing enum members

https://github.com/dlang/dmd/pull/12709
Comment 2 Dlang Bot 2021-07-07 07:38:02 UTC
dlang/dmd pull request #12709 "Fix issue 22038 - final switch error message should report all missing enum members" was merged into master:

- d7e217ae5fa3ee130299d43a3fd166ba499134a3 by dkorpel:
  fix issue 22038 - final switch error message should report all missing members

https://github.com/dlang/dmd/pull/12709