Skip to content

Fix remaining using nuing = aliases #44117

Closed

Description

@stephentoub

There are still a few places where we're explicitly defining nint/nuint as aliases for int/long/uint/ulong rather than using the new C# 9 types:

d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs(13):using nint = System.Int64;
d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs(14):using nuint = System.UInt64;
d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs(16):using nint = System.Int32;
d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs(17):using nuint = System.UInt32;
d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs(18):using nuint_t = System.UInt64;
d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs(20):using nuint_t = System.UInt32;
d:\repos\runtime\src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs(23):using nuint_t = System.UInt64;

cc: @GrabYourPitchforks

Activity

  1. Dotnet-GitSync-Bot commented on Nov 1, 2020

    @Dotnet-GitSync-Bot
    Collaborator

    I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

  2. jkotas commented on Nov 1, 2020

    @jkotas
    Member

    Fixing Utf16Utility.Validation.cs needs #36160.

  3. GrabYourPitchforks commented on Nov 2, 2020

    @GrabYourPitchforks
    Member

    Vector<nuint_t> is only used in one place in that file. We could use if (IntPtr.Size == 8) { /* ... */ } else { /* ... */ } if we really needed to. It's not that much code duplication.

  4. tannergooding commented on Jul 12, 2021

    @tannergooding
    Member

    This was resolved a bit back (same time as #36160 was resolved)

  5. removed
    untriagedNew issue has not been triaged by the area owner
    on Jul 12, 2021
  6. ghost locked as resolved and limited conversation to collaborators on Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.RuntimeenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions