Skip to content

Commit e6459c1

Browse files
committed
handle default
1 parent 7558ed9 commit e6459c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ExpressionDebugger/DebugInfoInjector.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,9 @@ Expression VisitBody(Expression node, bool shouldReturn = false)
506506
if (node.NodeType == ExpressionType.Block)
507507
return VisitBlock((BlockExpression) node, shouldReturn);
508508

509+
if (node.NodeType == ExpressionType.Default && node.Type == typeof(void))
510+
return node;
511+
509512
var lines = VisitBlockBody(new List<Expression> {node}, shouldReturn);
510513
return Expression.Block(lines);
511514
}

0 commit comments

Comments
 (0)