Closed bitapparat closed 4 years ago
I too ran into this issue with the exact same Method.
If it helps to resolve the issue, the source code for this Method is here: https://github.com/dotnet/roslyn/blob/master/src/Compilers/Core/Portable/Syntax/SyntaxNode.cs#L891
Sorry about that! I think I may have fixed it, but it would be great if you could test it out. I have created a branch, 'issue67' that contains the fix. Could you build a local copy from that branch and see if it fixes the problem for you? Here is the small repro that I created in order to test it out:
public class C { public void Foo() { Bar(this); } public void Bar(in C c){} }
Yes, it seems to be working without issue now. Thanks for the quick work.
You're welcome! Although @bitapparat might not agree about it being "quick".
I ran into a case where ilmerge corrupts the IL code during merge. An example would be the Microsoft.CodeAnalysis.dll assembly. The method Microsoft.CodeAnalysis.SyntaxToken.GetFirstToken, among others, is missing an IL statement after the merge.
IL code before the merge:
And the code after the merge:
Notice the missing "IL_0005: ldarga.s 0".