[release-branch.go1.15] xerrors: avoid infinite loop in test (detailed).Error method

For golang/go#40573

Change-Id: I5daaec48301cdedb2efcfadaf1dcd41cb8e96b01
Reviewed-on: https://go-review.googlesource.com/c/xerrors/+/246640
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
(cherry picked from commit 5ec99f83aff198f5fbd629d6c8d8eb38a04218ca)
Reviewed-on: https://go-review.googlesource.com/c/xerrors/+/247217
Run-TryBot: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
1 file changed