Browse Source

Fix incorrect method for static methods with instance signature

pull/3504/head
Maximilian Schmöcker 2 weeks ago
parent
commit
53d01869c9
No known key found for this signature in database
GPG Key ID: 9B984776B4651E76
  1. 2
      ICSharpCode.Decompiler/TypeSystem/MetadataModule.cs

2
ICSharpCode.Decompiler/TypeSystem/MetadataModule.cs

@ -535,6 +535,8 @@ namespace ICSharpCode.Decompiler.TypeSystem
{ {
if (m.TypeParameters.Count != signature.GenericParameterCount) if (m.TypeParameters.Count != signature.GenericParameterCount)
continue; continue;
if (signature.Header.IsInstance != !m.IsStatic)
continue;
if (CompareSignatures(m.Parameters, parameterTypes) && CompareTypes(m.ReturnType, signature.ReturnType)) if (CompareSignatures(m.Parameters, parameterTypes) && CompareTypes(m.ReturnType, signature.ReturnType))
{ {
method = m; method = m;

Loading…
Cancel
Save