Browse Source

Allow recombining of captured variables.

pull/1423/head
Daniel Grunwald 7 years ago
parent
commit
bb3b50d1af
  1. 9
      ICSharpCode.Decompiler/IL/ILVariable.cs

9
ICSharpCode.Decompiler/IL/ILVariable.cs

@ -443,7 +443,14 @@ namespace ICSharpCode.Decompiler.IL @@ -443,7 +443,14 @@ namespace ICSharpCode.Decompiler.IL
return false;
if (x.Kind == VariableKind.StackSlot || y.Kind == VariableKind.StackSlot)
return false;
return x.Index != null && x.Function == y.Function && x.Kind == y.Kind && x.Index == y.Index;
if (!(x.Function == y.Function && x.Kind == y.Kind))
return false;
if (x.Index != null)
return x.Index == y.Index;
else if (x.StateMachineField != null)
return x.StateMachineField.Equals(y.StateMachineField);
else
return false;
}
public int GetHashCode(ILVariable obj)

Loading…
Cancel
Save