You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
main: RangeSetContains.Equivalent hands any other one-argument Contains on RangeSet to the value overload #320
RangeSetContains.Equivalent (src/CodoMetis.ValueRanges.EFCore.PostgreSQL/Query/RangeSetContains.cs:62-64) maps a RangeSet<TRange, T>.Contains instance method to its static form by operand type: Set when the operand is the set type, Range when it is IRange<>, and Value for any other operand. Today the three overloads are the only ones, so every answer is right.
An overload added later, such as Contains(TRange) or one over a span, would be routed to Value<TRange, T>(set, T). The interceptor's Expression.Call would then throw ArgumentException at query compile. That failure is loud, but it comes from the interceptor and says nothing about the missing arm. This is the fallback-arm shape that AGENTS.md forbids for shape dispatch: a _ arm that produces a value instead of refusing.
Pick Value only when the operand is the set's T (its second type argument).
Throw for any other one-argument Contains, naming the overload that has no static form.
Have a test enumerate every public one-argument Contains on RangeSet<,> by reflection and check that Equivalent maps each one to a method taking that operand. A new overload then fails a test, not a query.
Release
Internal, and no answer changes. The port to release/10.x is #326.
Activity