Skip to content

Commit

Permalink
Fix #1185: assertion with unreachable code in loop detection
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrunwald committed Jul 29, 2018
1 parent c16817a commit 542e088
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ICSharpCode.Decompiler/IL/ControlFlow/LoopDetection.cs
Expand Up @@ -141,7 +141,7 @@ void IncludeBlock(Block block)
// (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);
Expand Down

0 comments on commit 542e088

Please sign in to comment.