Browse Source

Fix duplicate ILFunction annotations.

pull/3032/head
Siegfried Pammer 2 years ago
parent
commit
e8c1270b92
  1. 6
      ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs

6
ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs

@ -1698,10 +1698,7 @@ namespace ICSharpCode.Decompiler.CSharp @@ -1698,10 +1698,7 @@ namespace ICSharpCode.Decompiler.CSharp
var function = ilReader.ReadIL((MethodDefinitionHandle)method.MetadataToken, methodBody, cancellationToken: CancellationToken);
function.CheckInvariant(ILPhase.Normal);
if (entityDecl != null)
{
AddAnnotationsToDeclaration(method, entityDecl, function);
}
AddAnnotationsToDeclaration(method, entityDecl, function);
var localSettings = settings.Clone();
if (IsWindowsFormsInitializeComponentMethod(method))
@ -1751,7 +1748,6 @@ namespace ICSharpCode.Decompiler.CSharp @@ -1751,7 +1748,6 @@ namespace ICSharpCode.Decompiler.CSharp
entityDecl.AddChild(body, Roles.Body);
}
entityDecl.AddAnnotation(function);
CleanUpMethodDeclaration(entityDecl, body, function, localSettings.DecompileMemberBodies);
}

Loading…
Cancel
Save