Browse Source

Fix #1594: Use Equals to compare generic IMethods.

pull/1608/head
Siegfried Pammer 6 years ago
parent
commit
2e6a4988d3
  1. 2
      ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs

2
ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs

@ -212,7 +212,7 @@ namespace ICSharpCode.Decompiler.CSharp @@ -212,7 +212,7 @@ namespace ICSharpCode.Decompiler.CSharp
Debug.Assert(method.IsLocalFunction);
method = method.ReducedFrom;
foreach (var parent in currentFunction.Ancestors.OfType<ILFunction>()) {
var definition = parent.LocalFunctions.FirstOrDefault(f => f.Method == method);
var definition = parent.LocalFunctions.FirstOrDefault(f => f.Method.Equals(method));
if (definition != null) {
return definition;
}

Loading…
Cancel
Save