Skip to content

[core] #isEqual cannot compare double/float types #8

@sdcb

Description

@sdcb

If you write: #isEqual<A, 3, sql {...}>, you will not get correct SQL expected, this is because following code:


Using double.Equals(int) to compare double and int, this will always returns false (as in reference source):
https://referencesource.microsoft.com/#mscorlib/system/double.cs,148

We can do workaround by using decimal typed property instead of int property:
decimal A int A

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions