-
Notifications
You must be signed in to change notification settings - Fork 90
Readonly structs in standard library #893
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
Milestone
Comments
See also #894 for an effect of |
Hmm... I'm tempted to go with the first option, although we'll probably need an explanatory note to explain why they're not the same as in ECMA 335. @BillWagner, preferences for this? (I'm happy to create the PR.) |
I like the first option with the Note: as well. |
Right - I'll try to prep a PR soon. |
jskeet
added a commit
to jskeet/csharpstandard
that referenced
this issue
Aug 17, 2023
The remaining non-readonly structs are: - `Nullable<T>` (not sure why) - `ValueTuple<...>` (as it's mutable) Fixes dotnet#893.
jskeet
added a commit
to jskeet/csharpstandard
that referenced
this issue
Aug 18, 2023
The remaining non-readonly structs are: - `Nullable<T>` (not sure why) - `ValueTuple<...>` (as it's mutable) Fixes dotnet#893.
jskeet
added a commit
that referenced
this issue
Aug 18, 2023
The remaining non-readonly structs are: - `Nullable<T>` (not sure why) - `ValueTuple<...>` (as it's mutable) Fixes #893.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Of the struct types listed in Annex C of the C# 7.x draft, only a few are specified as
readonly struct
. In .NET however, most of them are defined asreadonly struct
.Is this allowed, and is it an extension?
Example
Types that are
readonly struct
in .NET but plainstruct
in Annex C include:Expected behavior
Could be solved in any of these ways:
readonly struct
in the standard, tooreadonly
to standard library struct typesreadonly struct
in Annex C to plainstruct
Additional context
Similar to #870 on attributes.
The text was updated successfully, but these errors were encountered: