From 055c60bc178f8d6fcbb3a4fc08c77644a8edc7ec Mon Sep 17 00:00:00 2001 From: LPeter1997 Date: Sun, 15 Oct 2023 10:31:00 +0200 Subject: [PATCH] Update DecisionTree.cs --- src/Draco.Compiler/Internal/FlowAnalysis/DecisionTree.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Draco.Compiler/Internal/FlowAnalysis/DecisionTree.cs b/src/Draco.Compiler/Internal/FlowAnalysis/DecisionTree.cs index 268989c8e..d0a33ecea 100644 --- a/src/Draco.Compiler/Internal/FlowAnalysis/DecisionTree.cs +++ b/src/Draco.Compiler/Internal/FlowAnalysis/DecisionTree.cs @@ -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);