Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Champion: numeric IntPtr #6065

Open
Tracked by #829
jcouv opened this issue Apr 26, 2022 · 4 comments
Open
Tracked by #829

Champion: numeric IntPtr #6065

jcouv opened this issue Apr 26, 2022 · 4 comments
Assignees
Labels
Implemented Needs ECMA Spec This feature has been implemented in C#, but still needs to be merged into the ECMA specification Proposal champion Proposal
Milestone

Comments

@jcouv
Copy link
Member

jcouv commented Apr 26, 2022

numeric IntPtr

Summary

System.IntPtr and System.UIntPtr become numeric types, aliased by nint and nuint, and gain the built-in status of nint and nuint.

Motivation

As part of numerics work for .NET 7, System.IntPtr and System.UIntPtr are becoming proper numeric types.
So the distinction between native integer types and their underlying types becomes unnecessary.

Detailed design

https://github.com/dotnet/csharplang/blob/main/proposals/csharp-11.0/numeric-intptr.md

Drawbacks

Alternatives

Unresolved questions

Design meetings

@iam3yal
Copy link
Contributor

iam3yal commented Apr 26, 2022

@jcouv
Copy link
Member Author

jcouv commented Apr 26, 2022

Yes, the spec is still only a draft PR for now. The link will work by next week.

@jcouv jcouv added this to the Working Set milestone May 9, 2022
Tanya-Solyanik added a commit to dotnet/winforms that referenced this issue Jul 11, 2022
src\System.Windows.Forms.Primitives\src\System\Windows\Forms\Message.cs#L31
src\System.Windows.Forms.Primitives\src\System\Windows\Forms\Message.cs(31,30): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'HWnd.get' is not part of the declared API.
Tanya-Solyanik added a commit to dotnet/winforms that referenced this issue Jul 12, 2022
src\System.Windows.Forms.Primitives\src\System\Windows\Forms\Message.cs#L31
src\System.Windows.Forms.Primitives\src\System\Windows\Forms\Message.cs(31,30): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'HWnd.get' is not part of the declared API.
dotnet-maestro bot added a commit to dotnet/winforms that referenced this issue Jul 12, 2022
[main] Update dependencies from dotnet/arcade


 - Got rid of API Compat warnings resulting from dotnet/csharplang#6065 :

src\System.Windows.Forms.Primitives\src\System\Windows\Forms\Message.cs#L31
src\System.Windows.Forms.Primitives\src\System\Windows\Forms\Message.cs(31,30): error RS0016: (NETCORE_ENGINEERING_TELEMETRY=Build) Symbol 'HWnd.get' is not part of the declared API.

 - Suppress IL2057, IL2062, ILL2096 messages about API that need trimmable annotations
@walczakb
Copy link

@jcouv In section 11.10 Shift Operators, the right argument is of time int for operator << and of type nint for operators >> and >>>. Is this intentional or a mistake? If intentional, why?

@jcouv
Copy link
Member Author

jcouv commented Jul 30, 2022

@walczakb That was a typo. Thanks for spotting. Fixed

@jcouv jcouv added the Proposal label Sep 17, 2024
@dotnet dotnet locked and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Implemented Needs ECMA Spec This feature has been implemented in C#, but still needs to be merged into the ECMA specification Proposal champion Proposal
Projects
None yet
Development

No branches or pull requests

4 participants