Contrary to their docstrings, long and unchecked-long are not identical to int

Description

The docstrings for cljs.core/long and cljs.core/unchecked-long say: "Coerce to long by stripping decimal places. Identical to `int'." However, their implementation and behavior differs from cljs.core/int. Some examples:

x

(int x)

(long x)

-5671919744

-1376952448

-5671919744

##Inf

0

##Inf

"a"

0

##NaN

"24248082057"

-1521721719

24248082057

unchecked-long's implementation is identical to long's so the results are the same. The solution I propose is to just drop the claim about identicalness.

Environment

ClojureScript 1.10.520, Node 11.10.0

Status

Assignee

Unassigned

Reporter

Miikka Koskinen

Labels

None

Approval

None

Patch

None

Affects versions

1.10.238

Priority

Trivial
Configure