Skip to content

Representation of function pointer types in the reflection stack #11354

@MichalStrehovsky

Description

@MichalStrehovsky

dotnet/csharplang#1951 discusses adding function pointer types to the C# language. The CLR has supported these for a while, but there are areas (such as the reflection stack), where function pointer types are weird/unhandled.

While this will just be a corner area of the C# language, we should probably at least track this:

  • Can we fix ldtoken method explicit instance int32 *(int32) not to return the token of System.IntPtr?
  • Can we use System.Reflection.Pointer to reflection invoke methods that take/return function pointers?
  • Do we need new APIs to inspect/reflection emit function pointer types?

Metadata

Metadata

Assignees

Labels

Cost:MWork that requires one engineer up to 2 weeksapi-suggestionEarly API idea and discussion, it is NOT ready for implementationarea-System.ReflectionenhancementProduct code improvement that does NOT require public API changes/additions

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions