VB -> C#: CS0115 no suitable method found to override
メンテナーはふだん 1 日以内に返信
@ATECoder がすでに取り組んでいます。
2020年12月23日 から。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
調査の方向性
issue に示されている VB プロパティを使用して変換を再現し、生成された C# と期待される出力を比較します。コンバーターによる VB のオーバーライド可能な読み取り専用プロパティの処理を追跡し、その後、getter と setter のセマンティクスに関する回帰テストを追加または更新します。生成された C# が CS0115 の原因となる無効な setter を導入しなければ完了です。
索引モデルが issue の本文から書いたものです。
説明
Input code
Protected Overridable ReadOnly Property AutoClearEnabledQueryCommand As String
Erroneous output
protected virtual string AutoClearEnabledQueryCommand { get; private set; }
Expected output
protected virtual string AutoClearEnabledQueryCommand { get; set; }
Details
- Product in use: both
- Version in use: 8.2.1
- Did you see it working in a previous version, which? n/a
- Any other relevant information to the issue, or your interest in contributing a fix.
Clearly, this seems to expose another conflict between VB and C#, which entails a breaking change.
CS0115 appears on the 'set' element.
It seems that the C# implementation would work if the VB code property is changed to Read/Write.
Protected Overridable Property AutoClearEnabledQueryCommand As String
protected virtual string AutoClearEnabledQueryCommand { get; set; }
If the VB code is not changed before the conversion, the converted code is bound to cause a breaking change. What is implemented on the converter side, then, is a matter of style and perhaps could be informed by having a set of configuration settings. Such settings could also be used, for example, to address the issue of the resources: replace or add in root.
It would seems if the VB cothat the VB code My take is that the VB code needs to change before conversion
- 主要言語
- C#
- スター
- 918
- フォーク
- 244
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 29
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
icsharpcode/CodeConverter のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
icsharpcode/CodeConverter#1271 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
icsharpcode/CodeConverter#1243 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
VB -> C#: Enum Values as Integer再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンGood for coding agent VB -> C#
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
icsharpcode/CodeConverter#1212 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Good for coding agent VB -> C#
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
icsharpcode/CodeConverter#1211 ·
メンテナーはふだん 1 日以内に返信
-
C# -> VB
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
icsharpcode/CodeConverter#1171 · コメント 7 件 ·
メンテナーはふだん 1 日以内に返信
icsharpcode/CodeConverter の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
umbraco/Umbraco.Automate#612 ·
メンテナーはふだん 1 日以内に返信
-
崩溃日志只按 CRLF 分行オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PCL-Community/PCL-CE#3872 ·
メンテナーはふだん 1 日以内に返信
-
type:task ux
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
elsa-workflows/elsa-foundation#5253 ·
メンテナーはふだん 1 日以内に返信