Browse Source

Fix failing InstructionFlags-assertion

pull/734/head
Siegfried Pammer 9 years ago
parent
commit
2d26c77682
  1. 3
      ICSharpCode.Decompiler/IL/Instructions/ILInstruction.cs

3
ICSharpCode.Decompiler/IL/Instructions/ILInstruction.cs

@ -67,7 +67,8 @@ namespace ICSharpCode.Decompiler.IL @@ -67,7 +67,8 @@ namespace ICSharpCode.Decompiler.IL
Debug.Assert(child.Parent == this);
Debug.Assert(this.GetChild(child.ChildIndex) == child);
// if child flags are invalid, parent flags must be too
Debug.Assert(child.flags != invalidFlags || this.flags == invalidFlags);
// exception: nested ILFunctions (lambdas)
Debug.Assert(this is ILFunction || child.flags != invalidFlags || this.flags == invalidFlags);
Debug.Assert(child.IsConnected == this.IsConnected);
child.CheckInvariant(phase);
}

Loading…
Cancel
Save