Skip to content

[matcher] Add type check in pairwiseCompare#2596

Merged
natebosch merged 1 commit intomasterfrom
bad-pairwise-compare
Feb 18, 2026
Merged

[matcher] Add type check in pairwiseCompare#2596
natebosch merged 1 commit intomasterfrom
bad-pairwise-compare

Conversation

@natebosch
Copy link
Copy Markdown
Member

Closes #2454

Currently a failure from the cast causes a failure output including:

 Which: has <null> which is not  <null> at index null

Fill in the missing info by adding an explicit type check instead of an
unchecked cast before passing to the comparison callback. Elements with
mismatched type are treated identically to those which fail the
comparison, but should be clear to a reader of the failure.

Closes #2454

Currently a failure from the cast causes a failure output including:

     Which: has <null> which is not  <null> at index null

Fill in the missing info by adding an explicit type check instead of an
unchecked cast before passing to the comparison callback. Elements with
mismatched type are treated identically to those which fail the
comparison, but should be clear to a reader of the failure.
@natebosch natebosch requested a review from a team as a code owner February 18, 2026 01:19
@natebosch natebosch requested review from brianquinlan and removed request for a team February 18, 2026 01:19
@github-actions
Copy link
Copy Markdown

PR Health

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check.

@natebosch natebosch merged commit 6f9e059 into master Feb 18, 2026
61 checks passed
@natebosch natebosch deleted the bad-pairwise-compare branch February 18, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pairwiseCompare produces confusing 'Which: has <null> which is not <null> at index null' error on type mismatch

2 participants