You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RuntimeMethodHandle.GetFunctionPointer() should check if generic method is constructed #101664
Calling GetFunctionPointer() on a non-constructed generic method throws InvalidProgramException: Common Language Runtime detected an invalid program. A more helpful error message could be added.
Unhandledexception. System.InvalidProgramException: Common Language Runtime detected an invalid program.
at System.RuntimeMethodHandle.GetFunctionPointer()in/runtime/src/coreclr/System.Private.CoreLib/src/System/RuntimeHandles.cs:line 829
at Program.<Main>$(String[]args)
Regression?
No
Known Workarounds
Not applicable
Configuration
.NET 8 and 9
linux-x64
Other information
If the type itself is a generic type it throws System.InvalidOperationException: Could not execute the method because either the method itself or the containing type is not fully instantiated.. I think that's the correct exception to be thrown.
Activity
dotnet-policy-service commentedon Apr 28, 2024
Tagging subscribers to this area: @dotnet/area-system-reflection
See info in area-owners.md if you want to be subscribed.