Skip to content

Commit

Permalink
Fix default nothrow behavior for MethodIL.GetObject (#50539)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas authored Apr 1, 2021
1 parent c46b05a commit d534c22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static ResolutionFailure GetAssemblyResolutionFailure(string simpleName)

public void Throw()
{
switch(_failureType)
switch (_failureType)
{
case FailureType.TypeLoadException1:
ThrowHelper.ThrowTypeLoadException(_name, _module);
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/tools/Common/TypeSystem/IL/MethodIL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/// <summary>
/// Gets a list of exception regions this method body defines.
Expand Down

0 comments on commit d534c22

Please sign in to comment.