Skip to content

Conversation

@exyi
Copy link
Contributor

@exyi exyi commented Jan 17, 2026

Simplest repro:

Convert(Constant(uint.MaxValue), typeof(double))

Previously it would return -1, since the conv.r.un instruction wasn't used. It was only applied to uint->float, but not for double or any other integer type. Only uint/ulong was problematic, but the test covers all integer types.
(nuint/nint are not supported by Linq.Expression conversions)

Simplest repro:

Convert(Constant(uint.MaxValue), typeof(double))

Previously it would return -1, since the conv.r.un instruction wasn't
used. It was only applied to uint->float, but not for double or any
other integer type. Only uint/ulong was problematic, but the test covers
all integer types.
(nuint/nint are not supported by Linq.Expression conversions)
@exyi exyi force-pushed the fix-uint-to-float-conversion branch from 457370f to 05fd573 Compare January 17, 2026 13:04
@dadhi
Copy link
Owner

dadhi commented Jan 20, 2026

Cool thanks. I will review and check later

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