Skip to content

Make univariant enums act like structs in type_of, so that they're aligned correctly. #4890

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
wants to merge 2 commits into from

Conversation

jld
Copy link
Contributor

@jld jld commented Feb 11, 2013

No description provided.

@jld
Copy link
Contributor Author

jld commented Feb 11, 2013

I'm not sure if this is the preferred way to get the LLVM types of the variant's fields; style advice welcome.

@brendanzab
Copy link
Member

Aren't newtype enums deprecated for newtype structs? ie. struct E(u32);@pcwalton made sure the alignment was correct when he implemented them.

jld added 2 commits February 17, 2013 12:20
…ctly.

Consts of such enums are aligned correctly, so we could either misalign
them to match the type_of, or fix the type_of.  The latter seems like a
better idea.
@jld
Copy link
Contributor Author

jld commented Feb 17, 2013

Updated to incoming, with a better description, and a fix for the missing pub that set check-fast on fire last time.

@jld
Copy link
Contributor Author

jld commented Feb 17, 2013

@bjz: I figure that, as long as they're in the language, it's worth having them work correctly, especially when the fix is relatively simple.

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.

4 participants