IntelliTect / IntelliTect/EssentialCSharp

Ensure Primary Constructor Parameter Member Generation Coverage

オープン
#780 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

manuscript
主要言語
C#
スター
418
フォーク
173
平均マージ
3分
マージ済み PR(30日)
3

説明

  • When a primary constructor parameter is used, the compiler captures the constructor parameter in a private field with a compiler-generated name.
    If a primary constructor parameter isn't used in the body of the type, no private field is captured. (That rule prevents accidentally allocating two copies of a primary constructor parameter that's passed to a base constructor.)
  • If the type includes the record modifier, the compiler instead synthesizes a public property with the same name as the primary constructor parameter.
  • For record class types, if a primary constructor parameter uses the same name as a base primary constructor, that property is a public property of the base record class type. It isn't duplicated in the derived record class type. These properties aren't generated for non-record types.
    See https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/instance-constructors#primary-constructors

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

リンクされている primary constructors のドキュメントから始め、次に、リポジトリにある primary constructors のパラメーターについての既存のカバレッジを探します。private-field capture、省略されたフィールド、record properties、継承された record properties のケースを、non-record との区別も含めて確認します。記載された各動作がテストまたは例でカバーされ、関連するテストスイートが成功すれば完了です。

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

評価

技術スタック
csharp
領域
testing-qa
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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