handzlikchris / handzlikchris/FastScriptReload

Interface implementation returning inner class isn't correctly patched

オープン
#162 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
2.2k
フォーク
167
PR マージ指標
30日以内にマージされた PR はありません

説明

Interface and class in the same file. Method returns inner class.
```csharp
public interface ITest {
Test.Builder Create(Entity entity, string prefixId);
}

public class Test : ITest {
Builder ITest.Create(Entity entity, string prefixId) {
// ...
return new Builder();
}

public class Builder { }
}
```
FSR produces:
```csharp
public interface ITest__Patched_{
Test.Builder Create(Entity entity, string prefixId);
}

public class Test__Patched_: ITest { // error CS0535
Builder ITest.Create(Entity entity, string prefixId) { // error CS0539
// ...
return new Builder();
}

public class Builder { }
}
```
error CS0535: 'Test__Patched_' does not implement interface member 'ITest.Create(Entity, string)'
error CS0539: 'Test__Patched_.Create(Entity, string)' in explicit interface declaration is not found among members of the interface that can be implemented

Moving interface out of the file doesn't help. Same CS0539 and CS0535 errors.

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

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず、インターフェイスと、そのメソッドがその内部クラスを返す内部クラスを含む、示されている C# の例を再現します。インターフェイスと実装クラスへのパッチ適用を追跡し、インターフェイスが同じファイルにある場合と移動された場合の両方で、生成されたコードが CS0535 や CS0539 なしにコンパイルできることを確認します。

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

評価

技術スタック
csharp
領域
devtools, game-dev
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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