Conversion for FixedStatement not implemented
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
El issue no nombra ningún archivo fuente ni prueba; empieza por localizar el punto de entrada del convertidor para FixedStatementSyntax y reproducir la entrada de C# proporcionada. Se considera terminado cuando las instrucciones fixed ya no generan un error de conversión y producen un VB.NET válido con un comportamiento del búfer fijado equivalente al de la salida esperada.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C#
- Estrellas
- 914
- Forks
- 242
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de icsharpcode/CodeConverter
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
icsharpcode/CodeConverter#1271 · 1 comentario ·
-
C# -> VB: most pattern matching fails to convertPosiblemente ocupada @gherards99 la tomó hace 33 días. AbiertoC# -> VB
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
icsharpcode/CodeConverter#1281 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
icsharpcode/CodeConverter#1275 ·
-
VB -> C#: Handleres of sub properties being untrackedPosiblemente ocupada @Igor-Tomasi la tomó hace 69 días. AbiertoVB -> C#
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
icsharpcode/CodeConverter#1273 ·
-
VB -> C#: "Group By Into" Linq queries supressing aggregations ("Into" part) in the converted codeAbiertoDifficult area VB -> C#
Dificultad 3/5 1-2 días Aptitud para principiantes 74/100
icsharpcode/CodeConverter#1272 ·
Todos los issues de icsharpcode/CodeConverter
Issues similares
-
Bug pulumi/pulumi
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
activescott/lessmsi#306 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
HTML sitemap lists unpublished pagesPosiblemente ocupada @KrzysztofPajak la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
grandnode/grandnode2#883 ·
Los mantenedores suelen responder en 1 día
-
[Bug]: `winapp ui <command> --on sandbox --help` starts sandbox setup instead of showing helpAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día