Conversion for FixedStatement not implemented
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
この issue にはソースファイルもテストも記載されていません。まず FixedStatementSyntax のコンバーターのエントリポイントを見つけ、提供された C# 入力を再現してください。fixed ステートメントで変換エラーが発生しなくなり、期待される出力と同等のピン留めされたバッファーの動作を持つ有効な VB.NET が生成されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Input code
In unsafe context
public class CSharpClass
{
public static void Main(){
byte[] bytes = [1, 2, 3];
fixed (byte* bufferPtr = bytes)
{
Console.WriteLine($"The address of the first array element: {(long)bufferPtr:X}.");
Console.WriteLine($"The value of the first array element: {*bufferPtr}.");
}
}
}
Erroneous output
Public Class CSharpClass
Public Shared Sub Main()
If True Then
Dim bytes As Byte() = _(1, 2, 3)
''' Cannot convert FixedStatementSyntax, CONVERSION ERROR: Conversion for FixedStatement not implemented, please report this issue in 'fixed (byte* bufferPtr = by...' at character 91
'''
'''
''' Input:
''' fixed (byte* bufferPtr = bytes)
''' {
''' Console.WriteLine($"The address of the first array element: {(long)bufferPtr:X}.");
''' Console.WriteLine($"The value of the first array element: {*bufferPtr}.");
''' }
'''
'''
End If
End Sub
End Class
Expected output
Imports System
Imports System.Runtime.InteropServices
Module Program
Public Shared Sub Main()
Dim bytes As Byte() = {1, 2, 3}
Dim bufferHandle As GCHandle = GCHandle.Alloc(bytes, GCHandleType.Pinned)
Try
Dim bufferPtr As IntPtr = bufferHandle.AddrOfPinnedObject()
Console.WriteLine($"The address of the first array element: {bufferPtr.ToInt64():X}.")
Console.WriteLine($"The value of the first array element: {Marshal.ReadByte(bufferPtr)}.")
Finally
bufferHandle.Free()
End Try
End Sub
End Module
Details
- Product in use: e.g. icsharpcode.github.io/CodeConverter / VS extension / both
- Version in use: e.g. 5.6.3 or a commit hash (if it's a 3rd party tool using this library, try one of the above)
- Did you see it working in a previous version, which?
- Any other relevant information to the issue, or your interest in contributing a fix.
- 主要言語
- C#
- スター
- 914
- フォーク
- 242
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
icsharpcode/CodeConverter のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
icsharpcode/CodeConverter#1271 · コメント 1 件 ·
-
C# -> VB: most pattern matching fails to convert対応中かも @gherards99 が 35 日前に担当しました。 オープンC# -> VB
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
icsharpcode/CodeConverter#1281 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
icsharpcode/CodeConverter#1275 ·
-
VB -> C#: Handleres of sub properties being untracked対応中かも @Igor-Tomasi が 71 日前に担当しました。 オープンVB -> C#
難易度 3/5 1〜2日 初心者へのやさしさ 62/100
icsharpcode/CodeConverter#1273 ·
-
VB -> C#: "Group By Into" Linq queries supressing aggregations ("Into" part) in the converted codeオープンDifficult area VB -> C#
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
icsharpcode/CodeConverter#1272 ·
icsharpcode/CodeConverter の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Volodymyr-Petrunin/Bankomaten#45 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AvaloniaUI/Avalonia#22420 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
dotnet/SqlClient#4823 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
type/automation type/tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
area-testing p1-recommended
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信