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

`FSharpValue.PreComputeTuplePropertyInfo` reports an out-of-range index for every struct tuple

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

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

@T-Gro がすでに取り組んでいます。

2026年10月19日 から。

  • #20815 @T-Gro による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
64/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
fsharp

調査の方向性

まず、FSharp.Core のソースとタプルのリフレクションに関するテストで FSharpValue.PreComputeTuplePropertyInfo を探します。struct タプルがどのように処理されるか、また現在の範囲外例外がどのように発生するかを確認します。issue では、動作する代替手段として PreComputeTupleReader と GetTupleField が示されています。struct タプルを使った呼び出しがサポートされるか、ユーザーにこれらの代替手段を案内する、文書化された ArgumentException で失敗すれば完了です。

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

説明

Bug Needs-Triage

FSharpValue.PreComputeTuplePropertyInfo fails for every index of a struct tuple type, and the message says that the index is out of range. That sends the reader to the wrong cause: a struct tuple keeps its items in fields, and the method returns a PropertyInfo.

Repro steps

open Microsoft.FSharp.Reflection

FSharpValue.PreComputeTuplePropertyInfo (typeof<struct (int * string)>, 0)

Expected behavior

Either support for struct tuples, or an ArgumentException that says that a struct tuple has no item properties and names FSharpValue.PreComputeTupleReader and FSharpValue.GetTupleField, which work for it.

Actual behavior

System.ArgumentException: The tuple index '0' was out of range for tuple type 'System.ValueTuple`2[[System.Int32, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.String, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. (Parameter 'index')

Known workarounds

FSharpValue.PreComputeTupleReader and FSharpValue.GetTupleField read struct tuples.

Related information

  • FSharp.Core 10.1.0.0, .NET SDK 10.0.402 (dotnet fsi), Windows 11
  • #4240 fixed FSharpValue.MakeTuple for struct tuples.
主要言語
F#
スター
4.3k
フォーク
881
平均マージ
4日 16時間
マージ済み PR(30日)
122

環境構築

Codespaces で開く

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

はじめの一歩

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

dotnet/fsharp のほかの issue

dotnet/fsharp の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

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

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