Skip to content

Review IL generated for conversions between primitive types and native integers #42457

@cston

Description

@cston

Review the IL generated for the conversions in NativeIntegerTests.Conversions():

  • The conversions to/from void* use System.[U]IntPtr.op_Explicit(void*) rather than conv.i or conv.u.
  • The unchecked and checked conversions of long and ulong differ (for instance, converting nint to ulong uses conv.i8 when unchecked but conv.ovf.u8 when checked).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions