xerrors: avoid infinite loop in test (detailed).Error method

Fixes golang/go#40536

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>
1 file changed