Skip to content

types.Float64Value(math.NaN()) causes a panic: expected behavior or bug? #1087

@mschuchard

Description

@mschuchard

Currently the Float64Value() constructor in the types package panics when the input is math.NaN(). math.NaN() does return a float64, but this is also kind of an edge case to be sure. What is interesting to me though is that types.Float64Value(math.Inf(1)) behaves as expected, and is a similar edge case.

Is this expected behavior or a bug? I encountered this during unit testing an edge case to ensure it errors appropriately in case there is any question why and/or how this occurred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions