Fable: Problem with decimal constructor

Created on 12 Mar 2019  路  2Comments  路  Source: fable-compiler/Fable

Hi @ncave! @MangelMaxime has reported this test is failing. The problem doesn't seem to be with Thoth but with the Decimal constructor. The 0.7833M literal is compiled to JS as follows (which converts to string as 7833):

Decimal.fromParts(7833, 0, 0, false, 4)

I noticed that reverting fable-compiler to 2.1.11 makes it work. Then the decimal literal becomes:

new Decimal("0.7833")

Between those releases there is this commit that added the decimal constructors. Could you please have a look?

Most helpful comment

@alfonsogarciacaro Fixed in #1786.

All 2 comments

@alfonsogarciacaro Yes, looks like the ToString is broken, I'll fix it (a bit later, busy atm).

@alfonsogarciacaro Fixed in #1786.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

et1975 picture et1975  路  3Comments

et1975 picture et1975  路  3Comments

rommsen picture rommsen  路  3Comments

MangelMaxime picture MangelMaxime  路  3Comments

MangelMaxime picture MangelMaxime  路  3Comments