diff --git a/src/Draco.Compiler/Internal/FlowAnalysis/DecisionTree.cs b/src/Draco.Compiler/Internal/FlowAnalysis/DecisionTree.cs index f60324119..ed10f407b 100644 --- a/src/Draco.Compiler/Internal/FlowAnalysis/DecisionTree.cs +++ b/src/Draco.Compiler/Internal/FlowAnalysis/DecisionTree.cs @@ -252,7 +252,6 @@ private void Build(MutableNode node) .ToHashSet(SpecializationComparer.Instance); // Track if there are any uncovered values in this domain - // TODO var uncoveredDomain = ValueDomain.CreateDomain(this.intrinsicSymbols, node.PatternMatrix[0][0].Type); // Specialize for each of these cases @@ -292,4 +291,12 @@ private static int FirstColumnWithRefutableEntry(MutableNode node) BoundDiscardPattern => true, _ => false, }; + + private static ImmutableArray? TryExplode(BoundPattern specializer, BoundPattern toExplode) => (specializer, toExplode) switch + { + (BoundDiscardPattern, _) => throw new ArgumentOutOfRangeException(nameof(specializer)), + (BoundLiteralPattern, BoundDiscardPattern) => ImmutableArray.Empty, + (BoundLiteralPattern lit1, BoundLiteralPattern lit2) when Equals(lit1.Value, lit2.Value) => ImmutableArray.Empty, + _ => null, + }; }