Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9921: Enum variables of type void should be illegal #1907

Merged
merged 2 commits into from Apr 18, 2013

Conversation

donc
Copy link
Collaborator

@donc donc commented Apr 18, 2013

Sounds like a trivial accepts-invalid bug, but the fix is necessary for my CTFE refactoring.

The important part of this pull request is to avoid calculating min and max for an enum with an erroneous base type, because in that case it was sending garbage to the CTFE engine.

If enum has no members but still has a base type, eg
enum X : BaseType;
we still need to run semantic on the memtype BaseType.
If the base type isn't valid, don't calculate enum.max
@WalterBright
Copy link
Member

WalterBright added a commit that referenced this pull request Apr 18, 2013
9921: Enum variables of type void should be illegal
@WalterBright WalterBright merged commit 2fb8a99 into dlang:master Apr 18, 2013
@donc donc deleted the voidenum9921 branch July 9, 2013 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants