-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix default nothrow behavior for MethodIL.GetObject #50539
Conversation
@@ -84,7 +84,7 @@ public static ResolutionFailure GetAssemblyResolutionFailure(string simpleName) | |||
|
|||
public void Throw() | |||
{ | |||
switch(_failureType) | |||
switch (_failureType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file gets compiled in NativeAOT branch with some more stylecop rules.
@@ -86,7 +86,7 @@ public abstract partial class MethodIL | |||
/// (typically a <see cref="MethodDesc"/>, <see cref="FieldDesc"/>, <see cref="TypeDesc"/>, | |||
/// or <see cref="MethodSignature"/>). | |||
/// </summary> | |||
public abstract Object GetObject(int token, NotFoundBehavior notFoundBehavior = NotFoundBehavior.ReturnNull); | |||
public abstract Object GetObject(int token, NotFoundBehavior notFoundBehavior = NotFoundBehavior.Throw); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is inconsistent with the default for EcmaMethodIL.GetObject
and with the original behavior.
Discovered by failing tests in NativeAOT FI (dotnet/runtimelab#898)