diff --git a/ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs b/ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs
index 191ee8b0f..1a10d2c7a 100644
--- a/ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs
+++ b/ICSharpCode.Decompiler/IL/Transforms/LocalFunctionDecompiler.cs
@@ -827,7 +827,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
if (!IsLocalFunctionMethod(module, method, context))
continue;
var md = metadata.GetMethodDefinition(method);
- if (md.DecodeSignature(new FindTypeDecoder(typeHandle, module, 0), default).ParameterTypes.Any())
+ if (md.DecodeSignature(new FindTypeDecoder(typeHandle, module), default).ParameterTypes.Any())
return true;
}
diff --git a/ICSharpCode.Decompiler/Metadata/FindTypeDecoder.cs b/ICSharpCode.Decompiler/Metadata/FindTypeDecoder.cs
index 7b5847fad..f4bc487d9 100644
--- a/ICSharpCode.Decompiler/Metadata/FindTypeDecoder.cs
+++ b/ICSharpCode.Decompiler/Metadata/FindTypeDecoder.cs
@@ -36,14 +36,21 @@ namespace ICSharpCode.Decompiler.Metadata
readonly string? namespaceName;
readonly PrimitiveTypeCode primitiveType;
- public FindTypeDecoder(TypeDefinitionHandle handle, PEFile declaringModule, PrimitiveTypeCode primitiveType)
+ ///
+ /// Constructs a FindTypeDecoder that finds uses of a specific type-definition handle.
+ /// This assumes that the module we are search in is the same as the module containing the type-definiton.
+ ///
+ internal FindTypeDecoder(TypeDefinitionHandle handle, PEFile declaringModule)
{
this.handle = handle;
this.declaringModule = declaringModule;
- this.primitiveType = primitiveType;
+ this.primitiveType = 0;
this.currentModule = null;
}
+ ///
+ /// Constructs a FindTypeDecoder that can be used to find in signatures from .
+ ///
public FindTypeDecoder(MetadataModule currentModule, ITypeDefinition type)
{
this.currentModule = currentModule;