We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
go version
golang.org/x/xerrors@v0.0.0-20190410155217-1f06c39b4373
Yes
go env
env agnostic
package main import ( "fmt" "golang.org/x/xerrors" ) type myErr struct { foo []string // uncomparable } func (myErr) Error() string { return "error" } func (myErr) Is(target error) bool { return true } func main() { if xerrors.Is(myErr{}, myErr{}) { fmt.Println("foo") } fmt.Println("bar") }
No runtime error
panic: runtime error: comparing uncomparable type main.myErr goroutine 1 [running]: golang.org/x/xerrors.Is(0x4d1200, 0xc00000c080, 0x4d1200, 0xc00000c0a0, 0xc000032728) ~/go/pkg/mod/golang.org/x/xerrors@v0.0.0-20190410155217-1f06c39b4373/wrap.go:55 +0x141 main.main() /tmp/mod/main.go:22 +0xb7
The text was updated successfully, but these errors were encountered:
Change https://golang.org/cl/175260 mentions this issue: errors: fix Is panic if passing uncomparable type
errors: fix Is panic if passing uncomparable type
Sorry, something went wrong.
Change https://golang.org/cl/174980 mentions this issue: xerrors: fix Is panic if passing uncomparable type
xerrors: fix Is panic if passing uncomparable type
0bf1f02
xerrors: fix Is panics if target is uncomparable
3850056
Analogous change to golang.org/cl/175260 Fixes golang/go#31841 Change-Id: I93bf093e8d5c13269fe7164a3a1b6956450998e5 Reviewed-on: https://go-review.googlesource.com/c/xerrors/+/174980 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Damien Neil <dneil@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
No branches or pull requests
What version of Go are you using (
go version
)?golang.org/x/xerrors@v0.0.0-20190410155217-1f06c39b4373
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?env agnostic
What did you do?
What did you expect to see?
No runtime error
What did you see instead?
The text was updated successfully, but these errors were encountered: