Skip to content

Commit

Permalink
Fix for nested If, regression from fa89817
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitz committed Jun 20, 2019
1 parent effa976 commit f0359ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Shared/VBCodeWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ protected override void WriteConditional(ConditionalExpression expr, object meta
return;
}

var outgoingMetadata = CreateMetadata(true, Conditional);
var outgoingMetadata = CreateMetadata(true);

if (CanInline(expr.Test)) {
Write("If ");
Expand Down Expand Up @@ -609,7 +609,7 @@ protected override void WriteConditional(ConditionalExpression expr, object meta
Write("Else");
if (expr.IfFalse is ConditionalExpression) {
Write(" ");
WriteNode("IfFalse", expr.IfFalse, outgoingMetadata);
WriteNode("IfFalse", expr.IfFalse, CreateMetadata(true, Conditional));
} else {
Indent();
WriteEOL();
Expand Down

0 comments on commit f0359ba

Please sign in to comment.