private static Interval <int> CreateRange(PrimitiveMatchEntry operandMatch) { return(operandMatch switch { RangeMatchEntry rangeMatch => rangeMatch.IntRange, SingleMatchEntry singleMatch => CreateRange(singleMatch.Operand, singleMatch.Operand), _ => throw new InvalidOperationException() });
private bool Equals(RangeMatchEntry other) { return(EqualityComparer <TOperand> .Default.Equals(MaxOperand, other.MaxOperand) && EqualityComparer <TOperand> .Default.Equals(MinOperand, other.MinOperand)); }