handzlikchris / handzlikchris/FastScriptReload
The BuilderPatternFunctionsRewriter class has some incorrect handling methods.
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 167
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
orgin code is:
` private static ClassA staicField;
public static ClassA GetStaicField()
{
return staicField;
}`
will be written to
` private static ClassA staicField;
public static ClassA_Patched_0 GetStaicField()
{
return staicField;
}`
The above code may lead to type mismatch errors.
Only "return this" needs to be rewrite. Perhaps it is necessary to add a check for whether there is a "return this".
static bool ReturnsThis(MethodDeclarationSyntax method)
{
var returnStatements = method.DescendantNodes().OfType();
return returnStatements.All(r => r.Expression is ThisExpressionSyntax);
}
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
BuilderPatternFunctionsRewriter クラスから始めて、メソッドの戻り値の型と return 文をどのように処理しているかを確認してください。示されている static getter のケースを再現し、その後、this を返すメソッドだけが書き換えられ、生成されたコードに型の不一致がないことを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100