Skip to content

Fix @intFromEnum and @tagName for auto-numbered enums with signed tag type #16096

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

Merged

Conversation

IntegratedQuantum
Copy link
Contributor

Fixes #16095

Previously the case of signed integers was ignored ignored as "out of range" for auto-numbered enums.

@Vexu Vexu enabled auto-merge (rebase) June 19, 2023 20:24
@jacobly0
Copy link
Member

Just tacked on handling and testing of more cases.

@jacobly0 jacobly0 force-pushed the fix_enumToInt_for_signed_integers branch from abf9934 to 494a816 Compare June 20, 2023 15:41
@jacobly0 jacobly0 force-pushed the fix_enumToInt_for_signed_integers branch from 494a816 to 13ebc61 Compare June 20, 2023 17:09
@jacobly0 jacobly0 changed the title Fix @enumToInt and @tagName for auto-numbered enums with signed tag type Fix @intFromEnum and @tagName for auto-numbered enums with signed tag type Jun 20, 2023
@Vexu Vexu merged commit 8875efe into ziglang:master Jun 21, 2023
@IntegratedQuantum IntegratedQuantum deleted the fix_enumToInt_for_signed_integers branch November 14, 2023 20:50
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.

@tagName() fails with enum backed by signed int
3 participants