-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Document how to change base type of an enum #9803
Document how to change base type of an enum #9803
Conversation
Umm, not sure why specs failed. They passed locally for me. Some caching issue? |
std specs also run with the current compiler, and |
EDIT: NVM, I misread. I suppose, but think this macro method would be most ideal :/. Maybe I'll add a todo to update it after the next release. |
Can you show a use case for this? |
@straight-shoota It originally came from some chat in Gitter. https://gitter.im/crystal-lang/crystal?at=5f7afbbc6e0eb8446967c41e I'd maybe ask @HertzDevil what he was doing it for. But IMO, there should be a better API for getting that type than doing a |
Unless there's a common use case I'd say |
Will leave it up to @HertzDevil then. If he doesn't have any specific use cases then I'm fine with closing, or at least revert the new method and keep the doc updates. |
I kinda forgot about this, but I just reverted the methods and just made this document how to change the base type of an enum. |
Co-authored-by: Johannes Müller <straightshoota@gmail.com>
AddTypeNode.base_type
forEnum
typesAddEnum.base_type
that uses the macro methodEnum
API docs