Skip to content

Commit

Permalink
Fix parameter types for Calli callsites
Browse files Browse the repository at this point in the history
Fixes #355
  • Loading branch information
KirillOsenkov committed Apr 1, 2024
1 parent b954ff1 commit 6bc2a4c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ILRepack/ReferenceFixator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,14 @@ private void FixReferences(Instruction instr)
{
var call_site = (Mono.Cecil.CallSite)instr.Operand;
call_site.ReturnType = Fix(call_site.ReturnType);
if (call_site.HasParameters)
{
for (int i = 0; i < call_site.Parameters.Count; i++)
{
var parameter = call_site.Parameters[i];
parameter.ParameterType = Fix(parameter.ParameterType);
}
}
}
else switch (instr.OpCode.OperandType)
{
Expand Down

0 comments on commit 6bc2a4c

Please sign in to comment.