Skip to content

Transformation from float to bigint #7089

@remitbri

Description

@remitbri

At the moment

let i = 1 let f = 1.3 let bigI = BigInt.fromInt(i) let bigF = BigInt.fromFloat(f)

is compiled to

var bigI = BigInt(1); var bigF = BigInt(1.3); var i = 1; var f = 1.3;

Problem: in JS, BigInt(x) is valid only if x is an integer, not a float, so running var bigF = BigInt(1.3) throws an error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions