docs(FrozenCeleritySet): document ArgumentException on the derived ctor - #294
Merged
marius-bughiu merged 1 commit intoJul 23, 2026
Merged
Conversation
The non-generic FrozenCeleritySet ctor forwards to the base FrozenCeleritySet<THasher> ctor, which throws ArgumentException when the source holds 2^30 or more distinct non-null elements. That path is reachable through the derived ctor but only ArgumentNullException was documented on it. The sibling FrozenCelerityDictionary derived ctor already carries this exception doc; this restores parity. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the XML documentation for FrozenCeleritySet(IEnumerable<string>) to accurately reflect the exception contract inherited from its generic base constructor, improving API documentation parity with FrozenCelerityDictionary and avoiding surprises for callers.
Changes:
- Documented the reachable
ArgumentExceptionthrown whensourcecontains2^30or more distinct non-nullelements. - Kept derived-constructor documentation consistent with the base
FrozenCeleritySet<THasher>(IEnumerable<string>)contract.
Coverage
Files below 100% line coverage
|
Benchmarks10 regressions Highlights
Collections (384)
Hashers (100)
Same-runner A/B (sharded 6-way): main ( |
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.
What
Added the missing
<exception cref="ArgumentException">element to the non-genericFrozenCeleritySet(IEnumerable<string>)constructor's XML docs.Why
That constructor is
: base(source)overFrozenCeleritySet<THasher>(IEnumerable<string>), whose documented (and reachable) contract throwsArgumentExceptionwhensourceholds2^30or more distinct non-nullelements — a count a power-of-two frozen table cannot represent. The derived ctor documented onlyArgumentNullException, so a caller reading its docs would not see the size-ceiling exception.The parallel type
FrozenCelerityDictionaryalready carries thisArgumentExceptiondoc on its derived ctor, so this change restores doc parity between the two frozen collections.Doc-only change; no behavioral impact.
Test plan
dotnet build— succeeds, 0 errors (no CS1591/doc warnings)