Skip to content

[clr-interp] Fix Double to ushort conversion#120960

Merged
davidwrighton merged 1 commit intodotnet:mainfrom
davidwrighton:fix_double_to_ushort_cast
Oct 22, 2025
Merged

[clr-interp] Fix Double to ushort conversion#120960
davidwrighton merged 1 commit intodotnet:mainfrom
davidwrighton:fix_double_to_ushort_cast

Conversation

@davidwrighton
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 21, 2025 23:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a type mismatch in the CLR interpreter's double-to-ushort conversion operation. The INTOP_CONV_U2_R8 instruction is intended to convert a double (R8 = 8-byte real) to an unsigned 16-bit integer (U2), but was incorrectly using float as the source type instead of double.

Key Changes:

  • Corrected the template parameter in ConvFpHelper from float to double for the INTOP_CONV_U2_R8 case

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

@davidwrighton davidwrighton enabled auto-merge (squash) October 21, 2025 23:34
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@davidwrighton davidwrighton merged commit 5ec95d4 into dotnet:main Oct 22, 2025
99 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants