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

Error on duplicate values in declaration of@enum #10309

Closed
wants to merge 1 commit into from

Conversation

jakebolewski
Copy link
Member

This PR causes @enum(Foo, bar, baz, bing=0) to throw an ArgumentError as both bing and bar are mapped to the value 1.

See discussion in #10168.

cc @StefanKarpinski, @quinnj

@quinnj
Copy link
Member

quinnj commented Feb 24, 2015

I was kind of leaning towards allowing duplicates and returning only canonical values in names. What are the other considerations for not allowing duplicate values?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants