Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Several MemoryExtensions.LastIndexOfAnyExcept overloads incorrectly document "first occurrence"

オープン 初心者向け
#136,282 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
83/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp
領域
documentation

調査の方向性

System.MemoryExtensions にある、列挙された MemoryExtensions.LastIndexOfAnyExcept<T> のオーバーロードの XML ドキュメントを開き、「first occurrence」という語句を検索します。近くのオーバーロードにも同じ文言がコピーされていないか確認します。該当する returns テキストを「last occurrence」に変更し、すべてのオーバーロードで文言が修正されたことを確認します。

索引モデルが issue の本文から書いたものです。

説明

area-System.Memory untriaged
Description

The XML documentation for several MemoryExtensions.LastIndexOfAnyExcept<T> overloads contains contradictory wording.

The method summaries correctly state that the methods search for the last index. However, their <returns> sections incorrectly say that the returned index is the index of the first occurrence:

The index in the span of the first occurrence of any value other than those in <paramref name="values"/>.

first occurrence should be changed to last occurrence.

Affected APIs
LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>?

LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values, IEqualityComparer<T>? comparer = null)

There may be additional overloads containing the same copied wording.

Reproduction Steps
  1. Open System.MemoryExtensions in the dotnet/runtime repository.
  2. Locate the XML documentation for the following overloads:
LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values) where T : IEquatable<T>?

LastIndexOfAnyExcept<T>(this ReadOnlySpan<T> span, ReadOnlySpan<T> values, IEqualityComparer<T>? comparer = null)
  1. Inspect the <returns> documentation.
Expected behavior

The <returns> documentation should state that the method returns the index of the last occurrence of a value.

Actual behavior

The <returns> documentation incorrectly states that the method returns the index of the first occurrence of a value.

Regression?

No known regression. This appears to be an existing XML documentation error.

Known Workarounds

No response

Configuration

Not configuration-specific. This issue affects the XML documentation in System.MemoryExtensions.

Other information

No response

主要言語
C#
スター
18.4k
フォーク
5.7k
平均マージ
2日 19時間
マージ済み PR(30日)
649

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

dotnet/runtime のほかの issue

dotnet/runtime の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。