Skip to content

Commit

Permalink
Update DecisionTree.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
LPeter1997 committed Oct 5, 2023
1 parent 9ff64e2 commit 1f3e965
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Draco.Compiler/Internal/FlowAnalysis/DecisionTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,15 @@ private void Build(MutableNode node)
// We covered the value, subtract
uncoveredDomain.SubtractPattern(pat);
// Add as child
node.Children.Add(new(pat, child));
node.MutableChildren.Add(new(pat, child));
}

// If not complete, do defaulting
if (!uncoveredDomain.IsEmpty)
{
var @default = this.Default(node);
// Add as child
node.Children.Add(new(BoundDiscardPattern.Default, @default));
node.MutableChildren.Add(new(BoundDiscardPattern.Default, @default));
}

// Recurse to children
Expand Down

0 comments on commit 1f3e965

Please sign in to comment.