go.tools/go/exact: fix bug introduced with CL 41170043

R=adonovan
CC=golang-dev
https://golang.org/cl/37820052
This commit is contained in:
Robert Griesemer 2013-12-12 14:18:40 -08:00
parent e2828468ff
commit 3df3227c35
1 changed files with 1 additions and 3 deletions

View File

@ -430,10 +430,8 @@ func MakeImag(x Value) Value {
// If x is Unknown, the result is Unknown.
func Real(x Value) Value {
switch x := x.(type) {
case unknownVal:
case unknownVal, int64Val, intVal, floatVal:
return x
case int64Val, intVal, floatVal:
return int64Val(0)
case complexVal:
return normFloat(x.re)
}