Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

markers: avoid panic on non-comparable structs #98

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

knz
Copy link
Contributor

@knz knz commented Sep 20, 2022

Found while investigating cockroachdb/cockroach#87555

If an error struct implements error by value and the struct is incomparable, the previous implementation of Is would panic. This patch fixes it.

Inspired from https://go-review.googlesource.com/c/go/+/175260


This change is Reviewable

If an error struct implements `error` by value and the struct is
incomparable, the previous implementation of `Is` would panic. This
patch fixes it.

Inspired from https://go-review.googlesource.com/c/go/+/175260
Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @nvanbenschoten)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants