Skip to content

Commit

Permalink
fix(MemberChange): support generic types
Browse files Browse the repository at this point in the history
This fix ensures one can reference properties in generic types.
  • Loading branch information
Christopher - Marcel Böddecker committed Mar 6, 2019
1 parent 1ddd298 commit d93148c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/MemberChangeMethod.Fody/ModuleWeaver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ private void InsertSetMethodCallIntoPropertySetter(
// Load this (for method call)
instructions.Insert(++instructionIndex, Instruction.Create(OpCodes.Ldarg_0));
// Call method
instructions.Insert(++instructionIndex, Instruction.Create(OpCodes.Callvirt, methodReference));
instructions.Insert(
++instructionIndex,
Instruction.Create(OpCodes.Callvirt, methodReference.CreateGenericMethodIfNeeded()));

methodBody.OptimizeMacros();

Expand Down

0 comments on commit d93148c

Please sign in to comment.