Skip to content

Commit

Permalink
[mono][System.Reflection.Emit] Fix explicitly setting the return type…
Browse files Browse the repository at this point in the history
… on a dynamic method (#95183)
  • Loading branch information
ivanpovazan committed Dec 6, 2023
1 parent 548830b commit 2bfa26c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ public void SetReturnType_TypeCreated_Works()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/2389", TestRuntimes.Mono)]
public void SetReturnType_NullReturnType_ReturnsVoid()
{
TypeBuilder type = Helpers.DynamicType(TypeAttributes.Abstract);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,9 @@ protected override void SetSignatureCore(Type? returnType, Type[]? returnTypeReq
Array.Copy(parameterTypes, this.parameters, parameterTypes.Length);
}

rtype = returnType;
if (returnType != null)
rtype = returnType;

returnModReq = returnTypeRequiredCustomModifiers;
returnModOpt = returnTypeOptionalCustomModifiers;
paramModReq = parameterTypeRequiredCustomModifiers;
Expand Down

0 comments on commit 2bfa26c

Please sign in to comment.