Skip to content

remove implicit cast from enum to uint64 index#6744

Merged
nwt merged 1 commit intomainfrom
remove-implicit-enum-cast
Mar 18, 2026
Merged

remove implicit cast from enum to uint64 index#6744
nwt merged 1 commit intomainfrom
remove-implicit-enum-cast

Conversation

@nwt
Copy link
Member

@nwt nwt commented Mar 18, 2026

The arithmetic operators implicitly cast an enum value to a uint64 corresponding to the value's index in the enum type. The "==" and "!=" comparison operators (but no others) also perform this implicit cast in sam (but not in vam). This isn't an important feature, so rather than make the comparison behavior more consistent, remove it.

The arithmetic operators implicitly cast an enum value to a uint64
corresponding to the value's index in the enum type.  The "==" and "!="
comparison operators (but no others) also perform this implicit cast in
sam (but not in vam).  This isn't an important feature, so rather than
make the comparison behavior more consistent, remove it.
@nwt nwt requested a review from a team March 18, 2026 19:18
@nwt nwt merged commit 21aadf5 into main Mar 18, 2026
2 checks passed
@nwt nwt deleted the remove-implicit-enum-cast branch March 18, 2026 19:23
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.

2 participants