MicrosoftDocs / feedback

📢 docs.microsoft.com site feedback
https://learn.microsoft.com
Creative Commons Attribution 4.0 International
239 stars 160 forks source link

Incorrect signatures for span indexers #468

Open BillWagner opened 6 years ago

BillWagner commented 6 years ago

The signatures for indexers of Span<T> and ReadOnlySpan<T> don't show correctly in API reference.

For Span<T>, it shows as:

public T this[int index] { get; }

When it should be:

public ref T this[int index] { get; }

For ReadOnlySpan<T>, it shows as:

public T& this[int index] { get; }

When it should be:

public ref readonly T this[int index] { get; }

This seems to be caused by incorrect behavior of mdoc, so I have created and issue about this there: https://github.com/mono/api-doc-tools/issues/249. But I thought it might make sense to also track fixing the output here (if and when mdoc is fixed), which is why I created this issue.

Moved from dotnet/docs#5208

/cc @svick

Powerhelmsman commented 6 years ago

@dend Please follow up with this bug.

svick commented 6 years ago

Also, for some types, the return type incorrectly includes namespace.

Specifically, the API reference page for ImmutableList<T>.ItemRef shows its return type as System.Collections.Immutable.T& when it should be ref readonly T.

dend commented 6 years ago

Will work with @joelmartinez on addressing this.

dend commented 6 years ago

Tracked here https://github.com/mono/api-doc-tools/issues/260

mairaw commented 5 years ago

As pointed out by @joelmartinez, issue https://github.com/mono/api-doc-tools/issues/260 was not exactly for this, so I've created a new one to track this particular issue: https://github.com/mono/api-doc-tools/issues/422