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

Enum that inherit UInt64 do not get right values #7268

Open
bcardiff opened this Issue Jan 4, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@bcardiff
Copy link
Member

bcardiff commented Jan 4, 2019

The compiler uses 32 bit integer to keep the values assigned to enum members.
If the Enum is declared with UInt64 as in https://github.com/crystal-lang/crystal/blob/master/src/llvm/enums.cr#L4 the user needs to assign values explicitly.

Affected lines https://github.com/crystal-lang/crystal/blob/master/src/compiler/crystal/semantic/top_level_visitor.cr#L683-L686

Extracted from #7262


$ crystal --version
Crystal 0.27.0

@bcardiff

This comment has been minimized.

Copy link
Member

bcardiff commented Jan 10, 2019

@RX14 I think there is no need to fix this issue for 0.27.1, it has been there for a while already.

@RX14 RX14 removed this from the 0.27.1 milestone Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment