-
Notifications
You must be signed in to change notification settings - Fork 847
Open
Labels
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendIlxGen, ilwrite and things at the backendBug
Milestone
Description
Using voidptr as a type argument does not cause a compiler error, even though it is invalid and causes a BadImageFormatException or TypeLoadException at runtime.
Repro steps
- Use
voidptras a type argument, e.g:
let badList: voidptr list = []
printf "%A" badList- Compile.
Expected behavior
An error, preventing compilation. This happens in C# with void*.
Actual behavior
No compilation error, but errors at runtime.
Known workarounds
Don't try to use voidptr as a generic type argument.
Related information
- Operating system: Kubuntu 25.10
- .NET Runtime kind: .NET 10
- Editing Tools: JetBrains Rider 2025.3.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendIlxGen, ilwrite and things at the backendBug
Type
Projects
Status
New