Skip to content

Reorganize the for-each quantifier matchers in QuantifierMatchers - #4690

Merged
robert-brunel merged 1 commit into
mainfrom
apple/robert-brunel/noe-2
Oct 9, 2026
Merged

robert-brunel merged 1 commit into
mainfrom
apple/robert-brunel/noe-2

Conversation

@robert-brunel

@robert-brunel robert-brunel commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor
  • Introduce the concept of a “plain” for-each quantifier with no added flavor such as null-on-empty. Add a corresponding Quantifier.ForEach.isPlain() method and the plainForEachQuantifier() and plainForEachQuantifierOverRef() matchers, which match plain for-each quantifiers only.
  • Replace forEachQuantifierWithoutDefaultOnEmptyOverRef() with plainForEachQuantifierOverRef(), and forEachQuantifierWithDefaultOnEmptyOverRef() with a withNullOnEmpty() constraint.
  • Remove the unused variants forEachQuantifier(CollectionMatcher), forEachQuantifierWithDefaultOnEmpty(), forEachQuantifierOverPlans() and the two-argument forEachQuantifierOverRef().
  • Document the class and all its methods.

This is a pre-refactoring for #4489.

@robert-brunel
robert-brunel added this pull request to stack #4691 September 29, 2026 17:02
@robert-brunel robert-brunel self-assigned this Sep 29, 2026
@robert-brunel robert-brunel added the cleanup Style/code cleanup with no behavioral change label Sep 29, 2026
Base automatically changed from apple/robert-brunel/noe-1 to main October 5, 2026 15:28
@robert-brunel
robert-brunel force-pushed the apple/robert-brunel/noe-2 branch from 49888f1 to 4b7d52e Compare October 5, 2026 15:28
* Add `Quantifier.ForEach.isPlain()` and the `plainForEachQuantifier()` and `plainForEachQuantifierOverRef()` matchers, which match plain for-each quantifiers only.
* Replace `forEachQuantifierWithoutDefaultOnEmptyOverRef()` with `plainForEachQuantifierOverRef()`, and `forEachQuantifierWithDefaultOnEmptyOverRef()` with a `withNullOnEmpty()` constraint.
* Remove the unused variants `forEachQuantifier(CollectionMatcher)`, `forEachQuantifierWithDefaultOnEmpty()`, `forEachQuantifierOverPlans()` and the two-argument `forEachQuantifierOverRef()`.
* Document the class and all its methods.
@robert-brunel
robert-brunel force-pushed the apple/robert-brunel/noe-2 branch from 4b7d52e to 291c10a Compare October 9, 2026 15:12
@robert-brunel
robert-brunel merged commit 1937990 into main Oct 9, 2026
14 checks passed
@robert-brunel
robert-brunel deleted the apple/robert-brunel/noe-2 branch October 9, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Style/code cleanup with no behavioral change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants