dotnet / ILMerge

ILMerge is a static linker for .NET Assemblies.
MIT License
1.22k stars 168 forks source link

Issue67: Allow "this" to be passed by reference (to methods that use the "in" modifier on the parameter) #85

Closed mike-barnett closed 4 years ago

mike-barnett commented 4 years ago

Fix Writer.cs so that "this" can have its address taken just as other parameters already could have. A small repro that illustrates this is:

public class C { public void Foo(int x) { Bar(this, x); } public void Bar(in C c, in int y){} }

Both arguments are passed by reference.