Repository navigation
fix: RangeSetContains.Equivalent refuses a Contains overload it has no static form for, on 10.x (port of #320, #326) - #436
Merged
CaffeinatedCoder merged 2 commits intoOct 25, 2026
Conversation
…o static form for (#320) Equivalent mapped a RangeSet.Contains instance method to its static form by operand type, and sent every operand that was neither the set nor an IRange<> to the value form. An overload added later, such as Contains(StringSet), would then fail in Expression.Call with an ArgumentException naming neither the overload nor the missing arm. Each overload is now matched by its exact operand type (the set, IRange<T> over the set's element, or T), and any other throws MissingArm naming it, as the translators do since #295. MissingArmTests holds it with a reflection test over every public one-argument Contains, which a new overload fails, and with an overload that does not exist. (cherry picked from commit d48da78) Ported to release/10.x for #326. Found-By: RV Defect-Class: SQL Co-Authored-By: Claude Opus 5.5 <[email protected]>
Base automatically changed from
test/433-translator-dispatch-10.x
to
release/10.x
October 25, 2026 14:28
CaffeinatedCoder
enabled auto-merge
October 25, 2026 14:29
CaffeinatedCoder
deleted the
chore/326-rangeset-contains-equivalent-10.x
branch
October 25, 2026 14:31
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #326
Port of #320 (PR #434, merged into
mainas 8b32901) torelease/10.x, for 10.3.0 (#408). It follows #433's PR #435, merged as 893c632: the refusal is #295'sMissingArm, which reached this line with it. Fixed only on this branch, so #326 is closed by hand after the merge.Problem
RangeSetContains.Equivalent, the copy 10.1.0 ships for #288, sends any one-argumentRangeSet.Containswhose operand is neither the set nor anIRange<>to the value overload. An overload added later would fail in the interceptor'sExpression.Callwith anArgumentExceptionthat names neither the overload nor the missing arm.Change
99962fe: cherry-pick of d48da78 (-x), unchanged.Equivalentmatches each overload by its exact operand type (the set,IRange<T>over the set's element, orT), and throwsMissingArmfor any other.MissingArm's wording now covers the interceptor too, and so does theAGENTS.mdrule.MissingArmTests.Internal, with no answer changes, so there's no changelog row.
Tests
Run on
release/10.xwith SDK 10.0.402:RangeSetContainstests pass (the reflection test overRangeSetofDateRange,Int32RangeandTimeRange, plus the refusal).RangeSetContains.Equivalenthands any other one-argumentContainsto the value overload (port of #320) #326 branch (which holds both commits), SDK 10.0.402: core 1,399, NodaTime 239, conventions 420, EF translation 323, NodaTime EF translation 91, ASP.NET Core 92, and on the EF floor both integration projects on PostgreSQL 16 and 18 (296 and 4 each), all passing. The newest-patch leg (EF Core 10.0.13, Npgsql EF 10.0.3) could not be run locally: restore fails intermittently on this machine with MSB4181 ("RestoreTask returned false but did not log an error"), and the test hosts kept the floor (deps.json checked), so I did not count those runs. CI ran it: both "EF Core 10.0.13" integration legs pass on this PR, after the step that checks each EF test host resolved 10.0.13.🤖 Generated with Claude Code