Skip to content

Conversation

@ntrel
Copy link
Contributor

@ntrel ntrel commented Sep 9, 2023

Fix Issue 18578 - First enum value assigned 0 instead of EnumBaseType.init.

Add an example also showing overflow.

@WalterBright suggested fixing the spec rather than breaking existing code:
dlang/dmd#7996 (comment)

Fix Issue 18578 - First enum value assigned 0 instead of EnumBaseType.init.
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @ntrel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
18578 normal First enum value assigned 0 instead of EnumBaseType.init

@ntrel ntrel changed the title First enum member is converted from 0 to base type [spec] First enum member is converted from 0 to base type Sep 9, 2023
@dkorpel dkorpel merged commit b076d13 into dlang:master Sep 20, 2023
@ntrel ntrel deleted the enum-zero branch September 20, 2023 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants