Skip to content

BigInt literals are broken. #588

@alula

Description

@alula

Expected Behavior

BigInt literals are supported properly as normal numbers.

Current Behavior

ESNext bigint literals are converted to normal numbers, resulting in broken code.

function a(b){return b<<10&4660;}a(123);

Stack trace

TypeError: Cannot mix BigInt and other types, use explicit conversions

Your Environment

  • Obfuscator version used: 0.27.2
  • Node version used: v12.10.0

Minimal working example that will help to reproduce issue

function test(a) {
  return a << 10n & 0x1234n
}
test(123n);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions