ClojureScript

Emitter cannot emit BigInt or BigDecimal

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Environment:
    r2202
  • Patch:
    Code and Test

Description

The reader understands BigInt and BigDecimal literals, but the emitter will throw an exception when it finds them.

I know CLJS does not have a proper number tower, but it should at least be able to accept literals like "1N" or "1.5M".

Attached is a patch which will cause the emitter to coerce BigInt and BigDecimal to double-approximations before emitting.

Activity

Hide
David Nolen added a comment -

Please rebase this patch to master. Thanks!

Show
David Nolen added a comment - Please rebase this patch to master. Thanks!
Hide
Francis Avila added a comment -

Rebased to master

Show
Francis Avila added a comment - Rebased to master

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: