funcool / funcool/decimal

Equality is broken for non decimal types

Open
#10 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.