Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sdcb opened this issue Jan 18, 2018 · 0 comments
Closed

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

sdcb opened this issue Jan 18, 2018 · 0 comments

Comments

@sdcb
Copy link
Owner

sdcb commented Jan 18, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant