Equality is broken for non decimal types
Open
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
```(= (dc/decimal 123) :x)```
results in
```
#object[Error Error: [DecimalError] Invalid argument: :x]
```
Due to the IEquiv implementation here:
https://github.com/funcool/decimal/blob/c0bee2ee62c62a3ba2a80008ec02e01daa0a736e/src/decimal/core.cljs#L752
It should check that the thing being compared is a number or decimal type.
I will send a PR soon.
Contributor guide
Assessment
This issue has not been assessed yet.