-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NativeAOT] FormatException instead of ArgumentException in MethodBase.GetMethodFromHandle #113016
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas |
Actually it does aim to support the correct exception, however fails to format the message for the exception. You can take the implementation of CoreCLR at runtime/src/coreclr/System.Private.CoreLib/src/System/Reflection/MethodBase.CoreCLR.cs Lines 22 to 26 in 7279752
|
I agree. I had assumed the inconsistencies in NativeAOT's conditional behavior were by design. |
@agocke cc |
Since you have found the root cause of the issue, you can submit a PR for it. |
Sure, let me try it. |
Description
The JIT throws the correct exception, but NativeAOT does not. And the if condition should use IsGenericType instead of IsConstructedGenericType to be consistent with the JIT and Mono.
like this 1e51807
Reproduction Steps
Expected behavior
Actual behavior
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: