Skip to content

Commit

Permalink
Made possible to call method that belongs to type that are not yet cr…
Browse files Browse the repository at this point in the history
…eated from the non-generic Emit.

Closes Pull-Request #3

Co-authored-by: chaplin89 <[email protected]>
  • Loading branch information
arlm and weddingmm committed Jul 8, 2019
1 parent 488a4c1 commit 7445894
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Sigil/NonGeneric/Emit.Call.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public Emit Call(ConstructorInfo constructor)
{
InnerEmit.Call(constructor);
return this;
}

}

/// <summary>
/// Calls the method being constructed by the given emit. Emits so used must have been constructed with BuildMethod or related methods.
///
Expand Down Expand Up @@ -61,9 +61,10 @@ public Emit Call(Emit emit, Type[] arglist = null)

emit.InnerEmit.DynMethod = dynMethod;
methodInfo = dynMethod;
}

return Call(methodInfo, arglist);
}

InnerEmit.Call(emit.InnerEmit, arglist);
return this;
}
}
}

0 comments on commit 7445894

Please sign in to comment.