Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add more precise inference for enum attributes #6867
This pull request makes two changes to enum attributes.
First, this PR refines type inference for expressions like
Second, the type of
Somewhat relatedly, this diff adds a few tests confirming we handle enum.auto() correctly.
Two additional notes:
Looks good! It's good to have less hacky enum support. I just left some nits.
By the way, what's the expected use case for inferring a literal type for things like
What's the status of supporting
Thanks for the review! I'll work on making the changes you suggested later today.
Just to quickly answer the two questions you asked though...