2
0

support NaN in Numeric.AssignTo

This commit is contained in:
leighhopcroft
2020-06-02 19:07:10 +01:00
parent 3cbb81631a
commit b708c8b985
2 changed files with 23 additions and 2 deletions
+7
View File
@@ -267,6 +267,13 @@ func (src *Numeric) AssignTo(dst interface{}) error {
}
case Null:
return NullAssignTo(dst)
case Undefined:
switch v := dst.(type) {
case *float32:
*v = float32(math.NaN())
case *float64:
*v = math.NaN()
}
}
return nil