From b28802d2f1ba9ef49fc3608d7026a524a98bdddb Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Wed, 8 Apr 2015 12:28:44 -0700 Subject: math/big: make ErrNaN actually implement the error interface (oversight) There was no way to get to the error message before. Change-Id: I4aa9d3d9f468c33f9996295bafcbed097de0389f Reviewed-on: https://go-review.googlesource.com/8660 Reviewed-by: Alan Donovan --- src/math/big/float_test.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/math/big/float_test.go') diff --git a/src/math/big/float_test.go b/src/math/big/float_test.go index 2a48ec4465..5b5a0247b1 100644 --- a/src/math/big/float_test.go +++ b/src/math/big/float_test.go @@ -12,6 +12,9 @@ import ( "testing" ) +// Verify that ErrNaN implements the error interface. +var _ error = ErrNaN{} + func (x *Float) uint64() uint64 { u, acc := x.Uint64() if acc != Exact { -- cgit v1.3-5-g9baa