Conversion for FixedStatement not implemented
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
L’issue non indica alcun file sorgente né alcun test; inizia individuando il punto di ingresso del convertitore per FixedStatementSyntax e riproducendo l’input C# fornito. Il lavoro è completato quando le istruzioni fixed non generano più un errore di conversione e producono VB.NET valido con un comportamento del buffer bloccato equivalente a quello dell’output previsto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C#
- Stelle
- 913
- Fork
- 243
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di icsharpcode/CodeConverter
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
icsharpcode/CodeConverter#1271 · 1 commento ·
-
C# -> VB
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
icsharpcode/CodeConverter#1281 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
icsharpcode/CodeConverter#1275 ·
-
VB -> C#
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
icsharpcode/CodeConverter#1273 ·
-
VB -> C#: "Group By Into" Linq queries supressing aggregations ("Into" part) in the converted codeApertaDifficult area VB -> C#
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
icsharpcode/CodeConverter#1272 ·
Tutte le issue di icsharpcode/CodeConverter
Issue simili
-
copilot documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 2 giorni
-
[Rust][Flaky Test] multiple_deadlines_fire_in_order asserts a wall-clock gap instead of firing orderApertaCI/CD ⚒️ Flaky-tests 🐦
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
valkey-io/valkey-glide#7255 ·
I maintainer di solito rispondono entro 3 giorni
-
bug good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
unoplatform/Uno.Core#99 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
aws/aws-dotnet-ai#75 ·