-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[InlineArray] should not have [EditorBrowsableState(Never)] #94283
Comments
Tagging subscribers to this area: @dotnet/area-system-runtime-compilerservices Issue DetailsDescriptionThe Lines 11 to 13 in 655b177
This seems... Wrong? There's no built-in C# syntax for inline arrays for now, so the attribute has to be used explicitly in user code. The fact it's hidden makes this clunkier than it needs to be. The attribute is already buried in a namespace that's explicitly documented as "unsafe" and only for advanced users, so this feels unnecessary. Shouldn't we just remove this?
|
Cc @VSadov - I can't find where the EditorBrowsable came from. I don't see the API review mentioning this. |
Yes, this should not be EditorBrowsableState.Never. We should remove it, and ideally service that for 8. |
Happy to take this and make a PR if this is up for grabs. I can also add the missing XML docs while at it 🙂 |
@Sergio0694, assigned to you |
I think the attribute was simply copied from other similar types when we still had assumptions that users will not need to put the attribute directly in the code, but instead compilers would emit it when implementing inline-array-like features. @Sergio0694 Thanks for fixing this!! |
Description
The
[InlineArray]
type is marked with[EditorBrowsable(EditorBrowsableState.Never)]
:runtime/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/InlineArrayAttribute.cs
Lines 11 to 13 in 655b177
This seems... Wrong? There's no built-in C# syntax for inline arrays for now, so the attribute has to be used explicitly in user code. The fact it's hidden makes this clunkier than it needs to be. The attribute is already buried in a namespace that's explicitly documented as "unsafe" and only for advanced users, so this feels unnecessary.
Shouldn't we just remove this?
And if so, I take it the ship has sailed for .NET 8 GA at this point?
The text was updated successfully, but these errors were encountered: