Browse Source

Fix #1185: assertion with unreachable code in loop detection

pull/1243/head
Daniel Grunwald 7 years ago
parent
commit
542e088ceb
  1. 2
      ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs

2
ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs

@ -141,7 +141,7 @@ namespace ICSharpCode.Decompiler.IL.ControlFlow @@ -141,7 +141,7 @@ namespace ICSharpCode.Decompiler.IL.ControlFlow
// (the entry-point itself doesn't have a CFG node, because it's newly created by this transform)
for (int i = 1; i < nestedContainer.Blocks.Count; i++) {
var node = context.ControlFlowGraph.GetNode(nestedContainer.Blocks[i]);
Debug.Assert(loop[0].Dominates(node));
Debug.Assert(loop[0].Dominates(node) || !node.IsReachable);
if (!node.Visited) {
node.Visited = true;
loop.Add(node);

Loading…
Cancel
Save