Browse Source

Skip LocalFunctionDecompiler if the top scope is LocalFunction or LocalFunctionDisplayClass

pull/1797/head
SilverFox 6 years ago
parent
commit
e60f1f5a87
  1. 2
      ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs

2
ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs

@ -65,6 +65,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -65,6 +65,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms
{
if (!context.Settings.LocalFunctions)
return;
if (IsLocalFunctionMethod(function.Method, context) || IsLocalFunctionDisplayClass(function.Method.ParentModule.PEFile, (TypeDefinitionHandle)function.Method.DeclaringTypeDefinition.MetadataToken, context))
return;
this.context = context;
this.resolveContext = new SimpleTypeResolveContext(function.Method);
var localFunctions = new Dictionary<MethodDefinitionHandle, LocalFunctionInfo>();

Loading…
Cancel
Save