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 15, 2023
1 parent 32a1585 commit 055c60b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Draco.Compiler/Internal/FlowAnalysis/DecisionTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,9 @@ private void Build(Node node)
// Specialize for each of these cases
foreach (var group in coveredPatterns)
{
foreach (var (pat, guard) in group)
var pat = group.Key;
var guards = group.Select(p => p.Guard).Distinct();
foreach (var guard in guards)
{
// Specialize to the pattern
var child = this.Specialize(node, pat);
Expand Down

0 comments on commit 055c60b

Please sign in to comment.