reflect: stop thinking that MaxFloat32 overflows float32.
Fixes #4282.
R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6759052
diff --git a/src/pkg/reflect/value.go b/src/pkg/reflect/value.go
index be5d035..2d217a5 100644
--- a/src/pkg/reflect/value.go
+++ b/src/pkg/reflect/value.go
@@ -1179,7 +1179,7 @@
if x < 0 {
x = -x
}
- return math.MaxFloat32 <= x && x <= math.MaxFloat64
+ return math.MaxFloat32 < x && x <= math.MaxFloat64
}
// OverflowInt returns true if the int64 x cannot be represented by v's type.