Fix interface conversion from int types to float64#741
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
4803df9 to
92a842f
Compare
|
Can we get a chance to review this pull request? |
| return makeValueBoolean(v), nil | ||
| case int, int8, int16, int32, int64: | ||
| return makeDoubleCheck(i, v.(float64)) | ||
| val, _ := v.(int64) |
There was a problem hiding this comment.
I'm not sure why we need to convert the value to int64.
Is the following code wrong?
return makeDoubleCheck(i, float64(v))There was a problem hiding this comment.
I see.
makeDoubleCheck(i, float64(v)) causes a compile error.
cannot convert v (variable of type interface{}) to type float64: need type assertion
|
I'm trying this pull request, but this doesn't work as expected. |
|
Closing in favour of #753 |
No description provided.