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
Commit e55fde6
Browse filesBrowse the repository at this point in the historyBrowse files
Drop the implicit List<Entity> conversion that makes three params overloads uncallable (#853)
* Drop the implicit List<Entity> conversion that made three params overloads uncallable
Entity had implicit conversions to itself from both Entity[] and List<Entity>, each
building a FiniteSet. The List one meant a list also converted to a single Entity,
so for any member with both an IEnumerable<Entity> overload and a params Entity[]
overload the params form became applicable in its expanded form, neither candidate
was better, and the call did not compile:
var equations = new List<Entity> { "x - 1", "y - 2" };
new EquationSystem(equations); // error CS0121
new FiniteSet(equations); // error CS0121
MathS.Equations(equations); // error CS0121
Not three defects -- one conversion breaking every params Entity[] overload in the
library, including any added later. A sweep of all 2602 members in PublicApi.txt for
the IEnumerable<T>/T[] overload pattern found exactly these three, and each was
confirmed by compiling the call in isolation. The array, IEnumerable<Entity> and
variadic forms always compiled; only a concrete List<Entity> broke, which is how it
reached a 2.0 preview unnoticed.
The Entity[] conversion is kept. An array binds to the params overload in its normal
form by an identity conversion, which wins outright, so it never had the ambiguity.
The new test compiling is the regression guard: restore the conversion and the test
project stops building. Sources/.editorconfig gets a per-file header section for it,
since Tests/UnitTests/Common still carries the 2022 template.
Verified: 6055 C# tests and 130 F# tests pass, the library, F# wrapper and Utils
build clean, and all ten call shapes in the ambiguity matrix now compile.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Say that this break falls between preview.1 and preview.2
preview.1 is published, and it has the conversion. Every other entry in the file
describes a change from 1.3.0 or 1.4.0, so the file's implicit frame is
release-to-release and a reader already on preview.1 would not learn from it that
this one lands on them. Checked: #848 is the only other commit to touch the file
since the preview.1 tag, and what it added is a 1.4.0 section, not a preview delta.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* Correct which previews carry the conversion
preview.2 was tagged while this branch sat unmerged, so it ships the conversion too
and the previous commit's "gone from preview.2" is wrong. Naming the version that
removes something from a branch that has not merged bets on merge order; the entry
now says "the release that follows them" and stops guessing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments