Skip to content

0.16.0-RC3 Enum .values does not return enums in order #6663

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

Closed
j-mie6 opened this issue Jun 11, 2019 · 0 comments
Closed

0.16.0-RC3 Enum .values does not return enums in order #6663

j-mie6 opened this issue Jun 11, 2019 · 0 comments
Assignees
Labels
area:desugar Desugaring happens after parsing but before typing, see desugar.scala area:enums itype:bug

Comments

@j-mie6
Copy link

j-mie6 commented Jun 11, 2019

The array returned by calling .values on an Enum type results in an Array which does not respect the ordering of the enums themselves (as given by their ordinal value). This is different from the behaviour of Java Enums.

@j-mie6 j-mie6 changed the title Enum .values does not return enums in order 0.16.0-RC3 Enum .values does not return enums in order Jun 11, 2019
@smarter smarter added area:desugar Desugaring happens after parsing but before typing, see desugar.scala itype:bug labels Jun 24, 2019
@bishabosha bishabosha mentioned this issue Nov 5, 2019
22 tasks
bishabosha added a commit to dotty-staging/dotty that referenced this issue Aug 10, 2020
bishabosha added a commit to dotty-staging/dotty that referenced this issue Aug 10, 2020
anatoliykmetyuk added a commit that referenced this issue Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:desugar Desugaring happens after parsing but before typing, see desugar.scala area:enums itype:bug
Projects
None yet
Development

No branches or pull requests

3 participants