Skip to content

Avoid double int casts when shifting by C++ enumerators - #857

Merged
tannergooding merged 1 commit into
dotnet:mainfrom
tannergooding:tannergooding-fix-shift-double-cast
Nov 14, 2026
Merged

tannergooding merged 1 commit into
dotnet:mainfrom
tannergooding:tannergooding-fix-shift-double-cast

Conversation

@tannergooding

Copy link
Copy Markdown
Member

Note

C++ enumerator shift counts already emit an int cast through implicit integral promotion. Avoid adding a second cast in the shift visitor, while preserving the explicit cast required for C enumerators and enum initializers.

Add regression coverage for shifts by enumerators and bump the managed package version to 23.1.5.1.

@tannergooding
tannergooding force-pushed the tannergooding-fix-shift-double-cast branch from 1bba0ac to 5064886 Compare November 14, 2026 22:49
@tannergooding
tannergooding merged commit 5ad3a90 into dotnet:main Nov 14, 2026
12 checks passed
@tannergooding
tannergooding deleted the tannergooding-fix-shift-double-cast branch November 14, 2026 23:01
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.

1 participant